/*! For license information please see 4135.d10e6cef.js.LICENSE.txt */ !function(e,t){"object"==typeof module&&"object"==typeof module.exports?t():"function"==typeof define&&define.amd?define([],t):(e="undefined"!=typeof globalThis?globalThis:e||self)&&t()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).xss={})}(this,function(e){"use strict";var t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n/g,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(e){return e.replace(i,"<").replace(o,">")},v={indexOf:function(e,t){var n,r;for(n=0,r=e.length;n127&&r<2048?t+=String.fromCharCode(r>>6|192)+String.fromCharCode(63&r|128):t+=String.fromCharCode(r>>12|224)+String.fromCharCode(r>>6&63|128)+String.fromCharCode(63&r|128)}return t}(e);l>2,o=(3&t)<<4|(n=e.charCodeAt(l++))>>4,a=(15&n)<<2|(r=e.charCodeAt(l++))>>6,s=63&r,isNaN(n)?a=s=64:isNaN(r)&&(s=64),c=c+u.charAt(i)+u.charAt(o)+u.charAt(a)+u.charAt(s);return c}function _(e){var t,n,r,i,o,a,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");c>4,n=(15&i)<<4|(o=s.indexOf(e.charAt(c++)))>>2,r=(3&o)<<6|(a=s.indexOf(e.charAt(c++))),u+=String.fromCharCode(t),64!==o&&(u+=String.fromCharCode(n)),64!==a&&(u+=String.fromCharCode(r));return function(e){for(var t="",n=0,r=0,i=0,o=0;n191&&r<224?(t+=String.fromCharCode((31&r)<<6|63&(o=e.charCodeAt(n+1))),n+=2):(o=e.charCodeAt(n+1),t+=String.fromCharCode((15&r)<<12|(63&o)<<6|63&(i=e.charCodeAt(n+2))),n+=3);return t}(u)}function b(e,t,n){var r="",i=0,o=!1,a=!1,s=0,u=e.length,c="",l="";e:for(s=0;s"===f||s===u-1){r+=n(e.slice(i,o)),c=function(e){var t,n=v.spaceIndex(e);return t=-1===n?e.slice(1,-1):e.slice(1,n+1),"/"===(t=v.trim(t).toLowerCase()).slice(0,1)&&(t=t.slice(1)),"/"===t.slice(-1)&&(t=t.slice(0,-1)),t}(l=e.slice(o,s+1)),r+=t(o,r.length,c,l,"0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}return -1}(e,c-1))){u(a,y(v.trim(e.slice(n,c)))),a=!1,n=c+1;continue}}}else{if(-1===(f=e.indexOf(l,c+1)))break;u(a,v.trim(e.slice(i+1,f))),a=!1,n=(c=f)+1}}else a=e.slice(n,c),n=c+1,i='"'===e.charAt(n)||"'"===e.charAt(n)?n:function(e,t){for(;te.charCodeAt(n)?" ":e.charAt(n);return v.trim(t)}(e=(e=(e=e.replace(s,'"')).replace(a,function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})).replace(u,":").replace(c," "))}(n),"href"===t||"src"===t){if("#"===(n=v.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(l.lastIndex=0,l.test(n))return""}else if("style"===t&&(h.lastIndex=0,h.test(n)||(f.lastIndex=0,f.test(n)&&(l.lastIndex=0,l.test(n)))))return"";return n=function(e){return e=p(e=e.replace(d,"""))}(n)}var k=function(e){return"string"==typeof e?e.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},E=function(){function e(e){var t=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{});t.stripIgnoreTag&&(t.onIgnoreTag,t.onIgnoreTag=function(){return""}),t.whiteList={},t.onTag=function(){},t.onTagAttr=function(){},t.onIgnoreTag=function(){},t.onIgnoreTagAttr=function(){},t.safeAttrValue=S,t.escapeHtml=p,this.options=Object.assign(t,e)}return e.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t,n,r,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&&(e=(t=(t=e.split("")).filter(function(e){var t=e.charCodeAt(0);return!(127===t||t<=31&&10!==t&&13!==t)})).join("")),s.allowCommentTag||(e=function(e){for(var t="",n=0;n");var s=function(e){var t=v.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=v.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=v.trim(e.slice(0,-1))),{html:e,closing:n}}(r),g=u[n],y=w(s.html,function(e,t){var r=-1!==v.indexOf(g,e),i=f(n,e,t,r);return null==i?r?(t=d(n,e,t,null))?"".concat(e,'="').concat(t,'"'):e:null==(i=h(n,e,t,r))?void 0:i:i});return r="<".concat(n),y&&(r+=" ".concat(y)),s.closing&&(r+=" /"),r+=">"}return null==(a=l(n,r,o))?p(r):a},p);return g&&(y=g.remove(y)),y},e}(),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")(),z=new(function(){function e(){var e=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var t,n,r="douyin_web";if(!v.includes(r,"bid"))return r;if(e.config&&e.config.bid)return e.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===(n=null===(t=null==T?void 0:T.Slardar)||void 0===t?void 0:t._baseParams)||void 0===n?void 0:n.bid)||"argus"},this.getConfigRegion=function(){var t;return v.includes("cn","region")?e.config&&e.config.region?e.config.region:((null===(t=null==T?void 0:T.gfdatav1)||void 0===t?void 0:t.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var t={cn:_("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:_("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:_("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:_("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:_("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:_("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:_("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[e.getConfigRegion()];if(t)return t+e.getSlardarBid()}}return e.prototype.setConfig=function(e){this.config=e},e.prototype.upload=function(){var e=this,t=this.gerReportUrl();!this.lock&&t&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var n=e.batchData.slice(0,100);e.batchData=e.batchData.slice(100),T.fetch(t,{method:"post",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).catch(function(e){}),e.lock=!1,e.upload()},this.timeout))},e.prototype.generateKey=function(e){return e.collectKey?[e.collectMode,e.collectKey].join("___"):""},e.prototype.push=function(e){this.batchData.push(e),this.upload()},e.prototype.report=function(e){var t=this.generateKey(e);if(T.fetch&&e.collectKey){var n="object"==typeof window?window.location.href:"SSR";e.documentUrl=n;var r={age:Math.floor(Date.now()),type:"xss",url:n,body:e,"user-agent":""};"enforce"===e.disposition&&"SSR"!==n||(r.url=t),"SSR"===n&&(r.url="SSR___".concat(r.url),r.body.ssr=!0),this.push(r)}},e}()),A=function(e){for(var t=0,n=function(n){Array.isArray(e[n])?0===e[n].length?delete e[n]:(e[n]=v.from(v.uniq(e[n])),t+=e[n].length):0===v.keys(e[n]).length?delete e[n]:v.keys(e[n]).forEach(function(r){e[n][r]=v.from(v.uniq(e[n][r])),t+=e[n][r].length})},r=0,i=v.keys(e);r0)return t&&t("javascript:"),!1;if(/^javascript:/i.test(e)){var i=e.slice(11).replace(/\s/g,"").trim();return!!v.some(["void","void(0)","void0","false","undefined",";"],function(e){return e===i})||(t&&t("javascript:"),!1)}return!0}var D=function(e,t){var n,r,i="<%= isSaveValidUrl =>";if("string"!=typeof e||(r=Number("<%= urlLimit =>"),void 0!==n&&(r=n),"NaN"!==e.toString()&&-1!==r&&e.length>=r)||R(e,t))return e;try{if(!0===(i=JSON.parse(i))||"true"===i){var o=new URL(e);return o.origin+o.pathname}}catch(e){}return"#"};function P(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=[]),"string"!=typeof e)return!0;if(!R(e=x(e)))return!1;var i,o={url:(i=e.match(/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/)||[])[0],scheme:i[1],slash:i[2],host:i[3],port:i[4],path:i[5],query:i[6],hash:i[7]},a=o.scheme,s=o.host;return r?!!r(e):!(!a||!s)&&(!v.includes(["http","https","file"],a)||("object"==typeof window&&window&&(t=n(n([],t,!0),[location.host],!1)),v.some(t,function(e){return!!(e instanceof RegExp&&e.test(s))||e===s})))}var O={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:[]},L={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var e=A(this.collect),t=e.count,n=e.ret;return this.collect=null,{collectKey:0===t?null:JSON.stringify(n),collectMode:"white"}},onIgnoreTagAttr:function(e,t,r){return e&&v.indexOf(["href","src"],t)>-1?L.domainWhiteList&&Array.isArray(L.domainWhiteList)&&L.domainWhiteList.length>0&&!P(r,n([],L.domainWhiteList,!0))?"":"".concat(t,'="').concat(D(r,function(e){var t;null===(t=L.collect)||void 0===t||t.filterProtocol.push(e)}),'"'):e&&(v.indexOf(["style","class","id"],t)>-1||t.indexOf("data-")>-1)?"".concat(t,'="').concat(r,'"'):(L.collect.whiteList[e]=L.collect.whiteList[e]||[],void L.collect.whiteList[e].push(t))},onIgnoreTag:function(e,t){if("style"===e)return t;b(t,function(e,t,n,r){w(I(r).html.replace("/",""),function(e){L.collect.whiteList[n]=L.collect.whiteList[n]||[],L.collect.whiteList[n].push(e)})},p)},whiteList:O,mergeWhiteList:function(e){for(var t,n={},r=0,i=v.keys(O);r");var o=I(r),a=w(o.html,function(e,t){var r,i=0;if(U.blackList[n]&&v.includes(U.blackList[n],e)&&(G.collect.blackList[n]=G.collect.blackList[n]||[],G.collect.blackList[n].push(e),i++),U.blackAttrRegExps.length&&U.blackAttrRegExps.some(function(t){return t.test(e)})&&v.forEach(U.blackAttrRegExps,function(t){t.test(e)&&(G.collect.blackAttrRegExps.push("".concat(t.toString(),"->").concat(e)),i++)}),U.blackAttrs.length&&v.includes(U.blackAttrs,e)&&(U.blackAttrs.push(e),i++),!i){if(U.filterList&&U.filterList[n]&&v.includes(U.filterList[n],e)){var o=D(t,function(e){var t;null===(t=G.collect)||void 0===t||t.filterProtocol.push(e)});return o!==t&&(G.collect.filterList[n]=G.collect.filterList[n]||[],G.collect.filterList[n].push(e)),t?"".concat(e,"='").concat(o,"'"):e}return U.filterAttrs&&v.includes(U.filterAttrs,e)?((o=D(t,function(e){var t;null===(t=G.collect)||void 0===t||t.filterProtocol.push(e)}))!==t&&(null===(r=G.collect)||void 0===r||r.filterAttrs.push(e)),t?"".concat(e,"='").concat(o,"'"):e):t?"".concat(e,"='").concat(t,"'"):e}});return r="<".concat(n),a&&(r+=" ".concat(a)),o.closing&&(r+=" /"),r+=">"},p);null===(n=G.collect)||void 0===n||n.blackTags.push(e)}},V=function(e){var t=e.reportOnly,n=void 0===t||t,r=e.block;return n&&"all"===n?"report":("string"==typeof n&&("true"===n&&(n=!0),"false"===n&&(n=!1)),r?"enforce":n?"report":"enforce")},H=function(e){return function(n,r,i){if(!n||"string"!=typeof n)return n;var o=r;e===C&&(o=L).initCollect();var a=e(n,o);if(k(a)===k(n))return n;if(!i)return a;var s=i.logType,u=V(i),c=o.removeCollect();return z.report(t(t({type:s,disposition:u},c),{sourceText:m(n),filterText:m(a)})),"enforce"===u?a:n}},K=H(function(e,t){return void 0===t&&(t={}),t&&t.whiteList||(t.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}),new E(t).process(e)}),W=H(C),q=function(e,t,n){var r=[],i=D(e,function(e){r.push(e)});if(i===e)return e;r=v.from(v.uniq(r));var o=t||n||{};if(!o)return i;var a=o.logType,s=V(n);return z.report({type:a,disposition:s,collectKey:r.join("___"),collectData:JSON.stringify(r),collectMode:"black",sourceText:m(e),filterText:m(i)}),"enforce"===s?i:e},Y=T._xssProject||{},Z=T.xssNamespace||{},X="3.0.26",Q={FilterXSS:E,version:X,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:K,_filterXSS:W,filterUrl:q,Config:L,BlackConfig:G,project:Y,setProjectName:function(e){Y[e]=this,T._xssProjectName=e}};Z.douyin_web=Q,T.xssNamespace=Z,T.Math&&!T.Math.xssNamespace&&(T.Math.xssNamespace=Z),Y[X]=Q,T.globalThis=T,T.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:Q},T.xss=Q,T.isSafeUrl=P,T.isSafeDomain=P,T.isSafeProtocol=R,T._xssProject=Y,T._xssProjectName&&(Y[T._xssProjectName]=Q);var J=Q.setProjectName.bind(Q);e.BlackConfig=G,e.Config=L,e.FilterXSS=E,e._filterXSS=W,e.filterUrl=q,e.filterXSS=K,e.isSafeDomain=P,e.isSafeProtocol=R,e.isSafeUrl=P,e.project=Y,e.setProjectName=J,e.setXssNamespace=function(e){var t=e.appId,n=e.bid,r=e.region;Z[t]=Q;L.bid=n,L.region=r,L.enabled=!0},e.xssNamespace=Z,Object.defineProperty(e,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["4135"],{668221:function(e,t,n){"use strict";n.d(t,{F:function(){return f}});var r,i,o=n(534569),a=n(129296),s=n(354629),u=n(235649),c=n(993069);function l(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){n(e);return}s.done?t(u):Promise.resolve(u).then(r,i)}var f=(i=(r=function(e,t,n){var r,i=arguments;return function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]3&&void 0!==i[3]?i[3]:a.lS.default,[4,(0,s.jv)(e)];case 1:if(!l.sent())return[2,o.P7];return[2,fetch((0,u.EW)(e,r),{credentials:"true"===t?"include":"omit"}).then(function(t){return t.ok?t.text():(null==n||n(c.k6.TemplateLoadError,e,t.status),o.eH)},function(){return null==n||n(c.k6.TemplateLoadError,e),o.eH})]}})},function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function a(e){l(o,n,i,a,s,"next",e)}function s(e){l(o,n,i,a,s,"throw",e)}a(void 0)})}),function(e,t,n){return i.apply(this,arguments)})},13954:function(e,t,n){"use strict";n.d(t,{$Z:function(){return LS},Cd:function(){return O3},VodLoggerPlugin:function(){return SL},ZP:function(){return pf},cG:function(){return LE},li:function(){return LC},sE:function(){return BX},wt:function(){return BY},xx:function(){return BJ}});var r,i,o,a,s,u,c,l,f=n(359223),h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{};function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var p=function(e){return e&&e.Math===Math&&e},v=p("object"==typeof globalThis&&globalThis)||p("object"==typeof window&&window)||p("object"==typeof self&&self)||p("object"==typeof h&&h)||p("object"==typeof h&&h)||function(){return this}()||Function("return this")(),g=function(e){try{return!!e()}catch(e){return!0}},y=!g(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),m=Function.prototype,_=m.apply,b=m.call,w="object"==typeof Reflect&&Reflect.apply||(y?b.bind(_):function(){return b.apply(_,arguments)}),S=Function.prototype,k=S.call,E=y&&S.bind.bind(k,k),T=y?E:function(e){return function(){return k.apply(e,arguments)}},z=T({}.toString),A=T("".slice),C=function(e){return A(z(e),8,-1)},I=function(e){if("Function"===C(e))return T(e)},x="object"==typeof document&&document.all,R=void 0===x&&void 0!==x?function(e){return"function"==typeof e||e===x}:function(e){return"function"==typeof e},D={},P=!g(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),O=Function.prototype.call,L=y?O.bind(O):function(){return O.apply(O,arguments)},M={},B={}.propertyIsEnumerable,N=Object.getOwnPropertyDescriptor,U=N&&!B.call({1:2},1);M.f=U?function(e){var t=N(this,e);return!!t&&t.enumerable}:B;var j,F,G=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},V=Object,H=T("".split),K=g(function(){return!V("z").propertyIsEnumerable(0)})?function(e){return"String"===C(e)?H(e,""):V(e)}:V,W=function(e){return null==e},q=TypeError,Y=function(e){if(W(e))throw new q("Can't call method on "+e);return e},Z=function(e){return K(Y(e))},X=function(e){return"object"==typeof e?null!==e:R(e)},Q={},J=function(e){return R(e)?e:void 0},$=function(e,t){return arguments.length<2?J(Q[e])||J(v[e]):Q[e]&&Q[e][t]||v[e]&&v[e][t]},ee=T({}.isPrototypeOf),et=v.navigator,en=et&&et.userAgent,er=en?String(en):"",ei=v.process,eo=v.Deno,ea=ei&&ei.versions||eo&&eo.version,es=ea&&ea.v8;es&&(F=(j=es.split("."))[0]>0&&j[0]<4?1:+(j[0]+j[1])),!F&&er&&(!(j=er.match(/Edge\/(\d+)/))||j[1]>=74)&&(j=er.match(/Chrome\/(\d+)/))&&(F=+j[1]);var eu=F,ec=v.String,el=!!Object.getOwnPropertySymbols&&!g(function(){var e=Symbol("symbol detection");return!ec(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&eu&&eu<41}),ef=el&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,eh=Object,ed=ef?function(e){return"symbol"==typeof e}:function(e){var t=$("Symbol");return R(t)&&ee(t.prototype,eh(e))},ep=String,ev=function(e){try{return ep(e)}catch(e){return"Object"}},eg=TypeError,ey=function(e){if(R(e))return e;throw new eg(ev(e)+" is not a function")},em=function(e,t){var n=e[t];return W(n)?void 0:ey(n)},e_=TypeError,eb={exports:{}},ew=Object.defineProperty,eS="__core-js_shared__",ek=eb.exports=v[eS]||function(e,t){try{ew(v,e,{value:t,configurable:!0,writable:!0})}catch(n){v[e]=t}return t}(eS,{});(ek.versions||(ek.versions=[])).push({version:"3.45.1",mode:"pure",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"});var eE=eb.exports,eT=function(e,t){return eE[e]||(eE[e]=t||{})},ez=Object,eA=function(e){return ez(Y(e))},eC=T({}.hasOwnProperty),eI=Object.hasOwn||function(e,t){return eC(eA(e),t)},ex=0,eR=Math.random(),eD=T(1.1.toString),eP=function(e){return"Symbol("+(void 0===e?"":e)+")_"+eD(++ex+eR,36)},eO=v.Symbol,eL=eT("wks"),eM=ef?eO.for||eO:eO&&eO.withoutSetter||eP,eB=function(e){return eI(eL,e)||(eL[e]=el&&eI(eO,e)?eO[e]:eM("Symbol."+e)),eL[e]},eN=function(e,t){var n,r;if("string"===t&&R(n=e.toString)&&!X(r=L(n,e))||R(n=e.valueOf)&&!X(r=L(n,e))||"string"!==t&&R(n=e.toString)&&!X(r=L(n,e)))return r;throw new e_("Can't convert object to primitive value")},eU=TypeError,ej=eB("toPrimitive"),eF=function(e,t){if(!X(e)||ed(e))return e;var n,r=em(e,ej);if(r){if(void 0===t&&(t="default"),!X(n=L(r,e,t))||ed(n))return n;throw new eU("Can't convert object to primitive value")}return void 0===t&&(t="number"),eN(e,t)},eG=function(e){var t=eF(e,"string");return ed(t)?t:t+""},eV=v.document,eH=X(eV)&&X(eV.createElement),eK=function(e){return eH?eV.createElement(e):{}},eW=!P&&!g(function(){return 7!==Object.defineProperty(eK("div"),"a",{get:function(){return 7}}).a}),eq=Object.getOwnPropertyDescriptor;D.f=P?eq:function(e,t){if(e=Z(e),t=eG(t),eW)try{return eq(e,t)}catch(e){}if(eI(e,t))return G(!L(M.f,e,t),e[t])};var eY=/#|\.prototype\./,eZ=function(e,t){var n=eQ[eX(e)];return n===e$||n!==eJ&&(R(t)?g(t):!!t)},eX=eZ.normalize=function(e){return String(e).replace(eY,".").toLowerCase()},eQ=eZ.data={},eJ=eZ.NATIVE="N",e$=eZ.POLYFILL="P",e0=I(I.bind),e1=function(e,t){return ey(e),void 0===t?e:y?e0(e,t):function(){return e.apply(t,arguments)}},e2={},e5=P&&g(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),e4=String,e3=TypeError,e6=function(e){if(X(e))return e;throw new e3(e4(e)+" is not an object")},e8=TypeError,e9=Object.defineProperty,e7=Object.getOwnPropertyDescriptor,te="enumerable",tt="configurable",tn="writable";e2.f=P?e5?function(e,t,n){if(e6(e),t=eG(t),e6(n),"function"==typeof e&&"prototype"===t&&"value"in n&&tn in n&&!n[tn]){var r=e7(e,t);r&&r[tn]&&(e[t]=n.value,n={configurable:tt in n?n[tt]:r[tt],enumerable:te in n?n[te]:r[te],writable:!1})}return e9(e,t,n)}:e9:function(e,t,n){if(e6(e),t=eG(t),e6(n),eW)try{return e9(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new e8("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var tr=P?function(e,t,n){return e2.f(e,t,G(1,n))}:function(e,t,n){return e[t]=n,e},ti=D.f,to=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return w(e,this,arguments)};return t.prototype=e.prototype,t},ta=function(e,t){var n,r,i,o,a,s,u,c,l,f=e.target,h=e.global,d=e.stat,p=e.proto,g=h?v:d?v[f]:v[f]&&v[f].prototype,y=h?Q:Q[f]||tr(Q,f,{})[f],m=y.prototype;for(o in t)r=!(n=eZ(h?o:f+(d?".":"#")+o,e.forced))&&g&&eI(g,o),s=y[o],r&&(u=e.dontCallGetSet?(l=ti(g,o))&&l.value:g[o]),a=r&&u?u:t[o],(n||p||typeof s!=typeof a)&&(c=e.bind&&r?e1(a,v):e.wrap&&r?to(a):p&&R(a)?I(a):a,(e.sham||a&&a.sham||s&&s.sham)&&tr(c,"sham",!0),tr(y,o,c),p&&(eI(Q,i=f+"Prototype")||tr(Q,i,{}),tr(Q[i],o,a),e.real&&m&&(n||!m[o])&&tr(m,o,a)))},ts=Array.isArray||function(e){return"Array"===C(e)};ta({target:"Array",stat:!0},{isArray:ts});var tu=Q.Array.isArray,tc=d(tu);function tl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0?th:tf)(t)},tp=function(e){var t=+e;return t!=t||0===t?0:td(t)},tv=Math.min,tg=function(e){var t=tp(e);return t>0?tv(t,9007199254740991):0},ty=function(e){return tg(e.length)},tm=TypeError,t_=function(e){if(e>9007199254740991)throw tm("Maximum allowed index exceeded");return e},tb=function(e,t,n){P?e2.f(e,t,G(0,n)):e[t]=n},tw=eB("toStringTag"),tS={};tS[tw]="z";var tk="[object z]"===String(tS),tE=eB("toStringTag"),tT=Object,tz="Arguments"===C(function(){return arguments}()),tA=function(e,t){try{return e[t]}catch(e){}},tC=tk?C:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=tA(t=tT(e),tE))?n:tz?C(t):"Object"===(r=C(t))&&R(t.callee)?"Arguments":r},tI=T(Function.toString);R(eE.inspectSource)||(eE.inspectSource=function(e){return tI(e)});var tx=eE.inspectSource,tR=function(){},tD=$("Reflect","construct"),tP=/^\s*(?:class|function)\b/,tO=T(tP.exec),tL=!tP.test(tR),tM=function(e){if(!R(e))return!1;try{return tD(tR,[],e),!0}catch(e){return!1}},tB=function(e){if(!R(e))return!1;switch(tC(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return tL||!!tO(tP,tx(e))}catch(e){return!0}};tB.sham=!0;var tN=!tD||g(function(){var e;return tM(tM.call)||!tM(Object)||!tM(function(){e=!0})||e})?tB:tM,tU=eB("species"),tj=Array,tF=function(e){var t;return ts(e)&&(tN(t=e.constructor)&&(t===tj||ts(t.prototype))||X(t)&&null===(t=t[tU]))&&(t=void 0),void 0===t?tj:t},tG=function(e,t){return new(tF(e))(0===t?0:t)},tV=eB("species"),tH=function(e){return eu>=51||!g(function(){var t=[];return(t.constructor={})[tV]=function(){return{foo:1}},1!==t[e](Boolean).foo})},tK=eB("isConcatSpreadable"),tW=eu>=51||!g(function(){var e=[];return e[tK]=!1,e.concat()[0]!==e}),tq=function(e){if(!X(e))return!1;var t=e[tK];return void 0!==t?!!t:ts(e)};ta({target:"Array",proto:!0,arity:1,forced:!tW||!tH("concat")},{concat:function(e){var t,n,r,i,o,a=eA(this),s=tG(a,0),u=0;for(t=-1,r=arguments.length;ts;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},t1={includes:t0(!0),indexOf:t0(!1)},t2={},t5=t1.indexOf,t4=T([].push),t3=function(e,t){var n,r=Z(e),i=0,o=[];for(n in r)!eI(t2,n)&&eI(r,n)&&t4(o,n);for(;t.length>i;)eI(r,n=t[i++])&&(~t5(o,n)||t4(o,n));return o},t6=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],t8=Object.keys||function(e){return t3(e,t6)};tX.f=P&&!e5?Object.defineProperties:function(e,t){e6(e);for(var n,r=Z(t),i=t8(t),o=i.length,a=0;o>a;)e2.f(e,n=i[a++],r[n]);return e};var t9,t7=$("document","documentElement"),ne=eT("keys"),nt=function(e){return ne[e]||(ne[e]=eP(e))},nn="prototype",nr="script",ni=nt("IE_PROTO"),no=function(){},na=function(e){return"<"+nr+">"+e+""},ns=function(e){e.write(na("")),e.close();var t=e.parentWindow.Object;return e=null,t},nu=function(){var e,t=eK("iframe");return t.style.display="none",t7.appendChild(t),t.src=String("java"+nr+":"),(e=t.contentWindow.document).open(),e.write(na("document.F=Object")),e.close(),e.F},nc=function(){try{t9=new ActiveXObject("htmlfile")}catch(e){}nc="undefined"!=typeof document?document.domain&&t9?ns(t9):nu():ns(t9);for(var e=t6.length;e--;)delete nc[nn][t6[e]];return nc()};t2[ni]=!0;var nl=Object.create||function(e,t){var n;return null!==e?(no[nn]=e6(e),n=new no,no[nn]=null,n[ni]=e):n=nc(),void 0===t?n:tX.f(n,t)},nf={},nh=t6.concat("length","prototype");nf.f=Object.getOwnPropertyNames||function(e){return t3(e,nh)};var nd={},np=T([].slice),nv=nf.f,ng="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ny=function(e){try{return nv(e)}catch(e){return np(ng)}};nd.f=function(e){return ng&&"Window"===C(e)?ny(e):nv(Z(e))};var nm={};nm.f=Object.getOwnPropertySymbols;var n_=function(e,t,n,r){return r&&r.enumerable?e[t]=n:tr(e,t,n),e},nb=function(e,t,n){return e2.f(e,t,n)},nw={};nw.f=eB;var nS,nk,nE,nT=e2.f,nz=function(e){var t=Q.Symbol||(Q.Symbol={});eI(t,e)||nT(t,e,{value:nw.f(e)})},nA=function(){var e=$("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=eB("toPrimitive");t&&!t[r]&&n_(t,r,function(e){return L(n,this)},{arity:1})},nC=e2.f,nI=tk?({}).toString:function(){return"[object "+tC(this)+"]"},nx=eB("toStringTag"),nR=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(eI(i,nx)||nC(i,nx,{configurable:!0,value:t}),r&&!tk&&tr(i,"toString",nI))},nD=v.WeakMap,nP=R(nD)&&/native code/.test(String(nD)),nO="Object already initialized",nL=v.TypeError,nM=v.WeakMap;if(nP||eE.state){var nB=eE.state||(eE.state=new nM);nB.get=nB.get,nB.has=nB.has,nB.set=nB.set,nS=function(e,t){if(nB.has(e))throw new nL(nO);return t.facade=e,nB.set(e,t),t},nk=function(e){return nB.get(e)||{}},nE=function(e){return nB.has(e)}}else{var nN=nt("state");t2[nN]=!0,nS=function(e,t){if(eI(e,nN))throw new nL(nO);return t.facade=e,tr(e,nN,t),t},nk=function(e){return eI(e,nN)?e[nN]:{}},nE=function(e){return eI(e,nN)}}var nU={set:nS,get:nk,has:nE,enforce:function(e){return nE(e)?nk(e):nS(e,{})},getterFor:function(e){return function(t){var n;if(!X(t)||(n=nk(t)).type!==e)throw new nL("Incompatible receiver, "+e+" required");return n}}},nj=T([].push),nF=function(e){var t=1===e,n=2===e,r=3===e,i=4===e,o=6===e,a=7===e,s=5===e||o;return function(u,c,l,f){for(var h,d,p=eA(u),v=K(p),g=ty(v),y=e1(c,l),m=0,_=f||tG,b=t?_(u,g):n||a?_(u,0):void 0;g>m;m++)if((s||m in v)&&(d=y(h=v[m],m,p),e)){if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:nj(b,h)}else switch(e){case 4:return!1;case 7:nj(b,h)}}return o?-1:r||i?i:b}},nG={forEach:nF(0),map:nF(1),filter:nF(2),some:nF(3),every:nF(4),find:nF(5),findIndex:nF(6),filterReject:nF(7)},nV=nG.forEach,nH=nt("hidden"),nK="Symbol",nW="prototype",nq=nU.set,nY=nU.getterFor(nK),nZ=Object[nW],nX=v.Symbol,nQ=nX&&nX[nW],nJ=v.RangeError,n$=v.TypeError,n0=v.QObject,n1=D.f,n2=e2.f,n5=nd.f,n4=M.f,n3=T([].push),n6=eT("symbols"),n8=eT("op-symbols"),n9=eT("wks"),n7=!n0||!n0[nW]||!n0[nW].findChild,re=function(e,t,n){var r=n1(nZ,t);r&&delete nZ[t],n2(e,t,n),r&&e!==nZ&&n2(nZ,t,r)},rt=P&&g(function(){return 7!==nl(n2({},"a",{get:function(){return n2(this,"a",{value:7}).a}})).a})?re:n2,rn=function(e,t){var n=n6[e]=nl(nQ);return nq(n,{type:nK,tag:e,description:t}),P||(n.description=t),n},rr=function(e,t,n){e===nZ&&rr(n8,t,n),e6(e);var r=eG(t);return e6(n),eI(n6,r)?(n.enumerable?(eI(e,nH)&&e[nH][r]&&(e[nH][r]=!1),n=nl(n,{enumerable:G(0,!1)})):(eI(e,nH)||n2(e,nH,G(1,nl(null))),e[nH][r]=!0),rt(e,r,n)):n2(e,r,n)},ri=function(e,t){e6(e);var n=Z(t);return nV(t8(n).concat(ru(n)),function(t){P&&!L(ro,n,t)||rr(e,t,n[t])}),e},ro=function(e){var t=eG(e),n=L(n4,this,t);return!(this===nZ&&eI(n6,t)&&!eI(n8,t))&&(!(n||!eI(this,t)||!eI(n6,t)||eI(this,nH)&&this[nH][t])||n)},ra=function(e,t){var n=Z(e),r=eG(t);if(n!==nZ||!eI(n6,r)||eI(n8,r)){var i=n1(n,r);return!i||!eI(n6,r)||eI(n,nH)&&n[nH][r]||(i.enumerable=!0),i}},rs=function(e){var t=n5(Z(e)),n=[];return nV(t,function(e){eI(n6,e)||eI(t2,e)||n3(n,e)}),n},ru=function(e){var t=e===nZ,n=n5(t?n8:Z(e)),r=[];return nV(n,function(e){eI(n6,e)&&(!t||eI(nZ,e))&&n3(r,n6[e])}),r};el||(n_(nQ=(nX=function(){if(ee(nQ,this))throw new n$("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?tZ(arguments[0]):void 0,t=eP(e),n=function(e){var r=void 0===this?v:this;r===nZ&&L(n,n8,e),eI(r,nH)&&eI(r[nH],t)&&(r[nH][t]=!1);var i=G(1,e);try{rt(r,t,i)}catch(e){if(!(e instanceof nJ))throw e;re(r,t,i)}};return P&&n7&&rt(nZ,t,{configurable:!0,set:n}),rn(t,e)})[nW],"toString",function(){return nY(this).tag}),n_(nX,"withoutSetter",function(e){return rn(eP(e),e)}),M.f=ro,e2.f=rr,tX.f=ri,D.f=ra,nf.f=nd.f=rs,nm.f=ru,nw.f=function(e){return rn(eB(e),e)},P&&nb(nQ,"description",{configurable:!0,get:function(){return nY(this).description}})),ta({global:!0,constructor:!0,wrap:!0,forced:!el,sham:!el},{Symbol:nX}),nV(t8(n9),function(e){nz(e)}),ta({target:nK,stat:!0,forced:!el},{useSetter:function(){n7=!0},useSimple:function(){n7=!1}}),ta({target:"Object",stat:!0,forced:!el,sham:!P},{create:function(e,t){return void 0===t?nl(e):ri(nl(e),t)},defineProperty:rr,defineProperties:ri,getOwnPropertyDescriptor:ra}),ta({target:"Object",stat:!0,forced:!el},{getOwnPropertyNames:rs}),nA(),nR(nX,nK),t2[nH]=!0;var rc=el&&!!Symbol.for&&!!Symbol.keyFor,rl=eT("string-to-symbol-registry"),rf=eT("symbol-to-string-registry");ta({target:"Symbol",stat:!0,forced:!rc},{for:function(e){var t=tZ(e);if(eI(rl,t))return rl[t];var n=$("Symbol")(t);return rl[t]=n,rf[n]=t,n}});var rh=eT("symbol-to-string-registry");ta({target:"Symbol",stat:!0,forced:!rc},{keyFor:function(e){if(!ed(e))throw TypeError(ev(e)+" is not a symbol");if(eI(rh,e))return rh[e]}});var rd=T([].push),rp=function(e){if(R(e))return e;if(ts(e)){for(var t=e.length,n=[],r=0;r=t.length)return e.target=null,r7(void 0,!0);switch(e.kind){case"keys":return r7(n,!1);case"values":return r7(t[n],!1)}return r7([n,t[n]],!1)},"values"),rP.Arguments=rP.Array;var ii={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};for(var io in ii)nR(v[io],io),rP[io]=rP.Array;var ia=e2.f,is=eB("metadata"),iu=Function.prototype;void 0===iu[is]&&ia(iu,is,{value:null});nz("metadata");var ic=$("Symbol"),il=ic.keyFor,ih=T(ic.prototype.valueOf),id=ic.isRegisteredSymbol||function(e){try{return void 0!==il(ih(e))}catch(e){return!1}};ta({target:"Symbol",stat:!0},{isRegisteredSymbol:id});for(var ip=$("Symbol"),iv=ip.isWellKnownSymbol,ig=$("Object","getOwnPropertyNames"),iy=T(ip.prototype.valueOf),im=eT("wks"),i_=0,ib=ig(ip),iw=ib.length;i_=s?e?"":void 0:(r=iz(o,a))<55296||r>56319||a+1===s||(i=iz(o,a+1))<56320||i>57343?e?iT(o,a):r:e?iA(o,a,a+2):i-56320+(r-55296<<10)+65536}},iI={codeAt:iC(!1),charAt:iC(!0)},ix=iI.charAt,iR="String Iterator",iD=nU.set,iP=nU.getterFor(iR);r9(String,"String",function(e){iD(this,{type:iR,string:tZ(e),index:0})},function(){var e,t=iP(this),n=t.string,r=t.index;return r>=n.length?r7(void 0,!0):(e=ix(n,r),t.index+=e.length,r7(e,!1))});var iO=eB("iterator"),iL=function(e){if(!W(e))return em(e,iO)||em(e,"@@iterator")||rP[tC(e)]},iM=d(iL),iB=function(e,t,n){var r,i;e6(e);try{if(!(r=em(e,"return"))){if("throw"===t)throw n;return n}r=L(r,e)}catch(e){i=!0,r=e}if("throw"===t)throw n;if(i)throw r;return e6(r),n},iN=eB("iterator"),iU=Array.prototype,ij=function(e){return void 0!==e&&(rP.Array===e||iU[iN]===e)},iF=TypeError,iG=function(e,t){var n=arguments.length<2?iL(e):t;if(ey(n))return e6(L(n,e));throw new iF(ev(e)+" is not iterable")},iV=function(e,t,n,r){try{return r?t(e6(n)[0],n[1]):t(n)}catch(t){iB(e,"throw",t)}},iH=Array,iK=function(e){var t=eA(e),n=tN(this),r=arguments.length,i=r>1?arguments[1]:void 0,o=void 0!==i;o&&(i=e1(i,r>2?arguments[2]:void 0));var a,s,u,c,l,f,h=iL(t),d=0;if(!h||this===iH&&ij(h))for(a=ty(t),s=n?new this(a):iH(a);a>d;d++)f=o?i(t[d],d):t[d],tb(s,d,f);else for(s=n?new this:[],l=(c=iG(t,h)).next;!(u=L(l,c)).done;d++)f=o?iV(c,i,[u.value,d],!0):u.value,tb(s,d,f);return s.length=d,s},iW=eB("iterator"),iq=!1;try{var iY=0,iZ={next:function(){return{done:!!iY++}},return:function(){iq=!0}};iZ[iW]=function(){return this},Array.from(iZ,function(){throw 2})}catch(e){}var iX=function(e,t){try{if(!t&&!iq)return!1}catch(e){return!1}var n=!1;try{var r={};r[iW]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n};ta({target:"Array",stat:!0,forced:!iX(function(e){Array.from(e)})},{from:iK});var iQ=Q.Array.from,iJ=d(iQ),i$=tH("slice"),i0=eB("species"),i1=Array,i2=Math.max;ta({target:"Array",proto:!0,forced:!i$},{slice:function(e,t){var n,r,i,o=Z(this),a=ty(o),s=t$(e,a),u=t$(void 0===t?a:t,a);if(ts(o)&&((tN(n=o.constructor)&&(n===i1||ts(n.prototype))||X(n)&&null===(n=n[i0]))&&(n=void 0),n===i1||void 0===n))return np(o,s,u);for(r=new(void 0===n?i1:n)(i2(u-s,0)),i=0;s1?arguments[1]:void 0)}});var os=i5("Array","filter"),ou=Array.prototype,oc=function(e){var t=e.filter;return e===ou||ee(ou,e)&&t===ou.filter?os:t},ol=d(oc),of={exports:{}},oh=D.f;ta({target:"Object",stat:!0,forced:!P||g(function(){oh(1)}),sham:!P},{getOwnPropertyDescriptor:function(e,t){return oh(Z(e),t)}});var od=Q.Object,op=of.exports=function(e,t){return od.getOwnPropertyDescriptor(e,t)};od.getOwnPropertyDescriptor.sham&&(op.sham=!0);var ov=of.exports,og=d(ov),oy=TypeError,om=Object.getOwnPropertyDescriptor,o_=P&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(ts(e)&&!om(e,"length").writable)throw new oy("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t};ta({target:"Array",proto:!0,arity:1,forced:g(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=eA(this),n=ty(t),r=arguments.length;t_(n+r);for(var i=0;i1?arguments[1]:void 0)};ta({target:"Array",proto:!0,forced:[].forEach!==oT},{forEach:oT});var oz=i5("Array","forEach"),oA=Array.prototype,oC={DOMTokenList:!0,NodeList:!0},oI=function(e){var t=e.forEach;return e===oA||ee(oA,e)&&t===oA.forEach||eI(oC,tC(e))?oz:t},ox=d(oI),oR=T([].concat),oD=$("Reflect","ownKeys")||function(e){var t=nf.f(e6(e)),n=nm.f;return n?oR(t,n(e)):t};ta({target:"Object",stat:!0,sham:!P},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Z(e),i=D.f,o=oD(r),a={},s=0;o.length>s;)void 0!==(n=i(r,t=o[s++]))&&tb(a,t,n);return a}});var oP=Q.Object.getOwnPropertyDescriptors,oO=d(oP),oL={exports:{}},oM=tX.f;ta({target:"Object",stat:!0,forced:Object.defineProperties!==oM,sham:!P},{defineProperties:oM});var oB=Q.Object,oN=oL.exports=function(e,t){return oB.defineProperties(e,t)};oB.defineProperties.sham&&(oN.sham=!0);var oU=oL.exports,oj=d(oU),oF={exports:{}},oG=e2.f;ta({target:"Object",stat:!0,forced:Object.defineProperty!==oG,sham:!P},{defineProperty:oG});var oV=Q.Object,oH=oF.exports=function(e,t,n){return oV.defineProperty(e,t,n)};oV.defineProperty.sham&&(oH.sham=!0);var oK=oF.exports,oW=d(oK),oq=nw.f("toPrimitive"),oY=d(oq);function oZ(e){var t=function(e,t){if("object"!=ot(e)||!e)return e;var n=e[oY];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ot(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ot(t)?t:t+""}function oX(e,t,n){return(t=oZ(t))in e?oW(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oQ(e,t){var n=or(e);if(oo){var r=oo(e);t&&(r=ol(r).call(r,function(t){return og(e,t).enumerable})),oS(n).apply(n,r)}return n}function oJ(e){for(var t=1;t3?(i=p===r)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=n<2&&dr||r>p)&&(o[4]=n,o[5]=r,h.n=p,s=0))}if(i||n>1)return a;throw f=!0,r}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(n,i,o),!0),u}var a={};function s(){}function u(){}function c(){}t=o0;var l=[][r]?t(t([][r]())):(ad(t={},r,function(){return this}),t),f=c.prototype=s.prototype=ae(l);function h(e){return ah?ah(e,c):(e.__proto__=c,ad(e,i,"GeneratorFunction")),e.prototype=ae(f),e}return u.prototype=c,ad(f,"constructor",c),ad(c,"constructor",u),u.displayName="GeneratorFunction",ad(c,i,"GeneratorFunction"),ad(f),ad(f,i,"Generator"),ad(f,r,function(){return this}),ad(f,"toString",function(){return"[object Generator]"}),(ap=function(){return{w:o,m:h}})()}var av=Error,ag=T("".replace),ay=String(new av("zxcasd").stack),am=/\n\s*at [^:]*:[^\n]*/,a_=am.test(ay),ab=!g(function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",G(1,7)),7!==e.stack)}),aw=function(e,t){if(a_&&"string"==typeof e&&!av.prepareStackTrace)for(;t--;)e=ag(e,am,"");return e},aS=Error.captureStackTrace,ak=TypeError,aE=function(e,t){this.stopped=e,this.result=t},aT=aE.prototype,az=function(e,t,n){var r,i,o,a,s,u,c,l=n&&n.that,f=!(!n||!n.AS_ENTRIES),h=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=e1(t,l),g=function(e){return r&&iB(r,"normal"),new aE(!0,e)},y=function(e){return f?(e6(e),p?v(e[0],e[1],g):v(e[0],e[1])):p?v(e,g):v(e)};if(h)r=e.iterator;else if(d)r=e;else{if(!(i=iL(e)))throw new ak(ev(e)+" is not iterable");if(ij(i)){for(o=0,a=ty(e);a>o;o++)if((s=y(e[o]))&&ee(aT,s))return s;return new aE(!1)}r=iG(e,i)}for(u=h?e.next:r.next;!(c=L(u,r)).done;){try{s=y(c.value)}catch(e){iB(r,"throw",e)}if("object"==typeof s&&s&&ee(aT,s))return s}return new aE(!1)},aA=function(e,t){X(t)&&"cause"in t&&tr(e,"cause",t.cause)},aC=function(e,t,n,r){ab&&(aS?aS(e,t):tr(e,"stack",aw(n,r)))},aI=eB("toStringTag"),ax=Error,aR=[].push,aD=function(e,t){var n,r=ee(aP,this);r0?n=r0(new ax,r?rV(this):aP):tr(n=r?this:nl(aP),aI,"Error"),void 0!==t&&tr(n,"message",function(e,t){return void 0===e?arguments.length<2?"":t:tZ(e)}(t)),aC(n,aD,n.stack,1),arguments.length>2&&aA(n,arguments[2]);var i=[];return az(e,aR,{that:i}),tr(n,"errors",i),n};r0?r0(aD,ax):function(e,t,n){for(var r=oD(t),i=e2.f,o=D.f,a=0;a1?np(arguments,1):[],n=sI.f(this),r=sS(function(){return w(ey(e),void 0,t)});return(r.error?n.reject:n.resolve)(r.value),n.promise}});ta({target:"Promise",stat:!0},{withResolvers:function(){var e=sI.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var us=sk&&sk.prototype;ta({target:"Promise",proto:!0,real:!0,forced:!!sk&&g(function(){us.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=aY(this,$("Promise")),n=R(e);return this.then(n?function(n){return ue(t,e()).then(function(){return n})}:e,n?function(n){return ue(t,e()).then(function(){throw n})}:e)}});var uu=Q.Promise,uc=d(uu),ul=nw.f("asyncIterator"),uf=d(ul);function uh(e,t){var n;this.next||(ad(uh.prototype),ad(uh.prototype,"function"==typeof iE&&uf||"@asyncIterator",function(){return this})),ad(this,"_invoke",function(r,i,o){function a(){return new t(function(n,i){(function n(r,i,o,a){try{var s=e[r](i),u=s.value;return u instanceof o8?t.resolve(u.v).then(function(e){n("next",e,o,a)},function(e){n("throw",e,o,a)}):t.resolve(u).then(function(e){s.value=e,o(s)},function(e){return n("throw",e,o,a)})}catch(e){a(e)}})(r,o,n,i)})}return n=n?n.then(a,a):a()},!0)}function ud(e,t,n,r,i){return new uh(ap().w(e,t,n,r),i||uc)}var up=TypeError,uv=function(e,t){if(!delete e[t])throw new up("Cannot delete property "+ev(t)+" of "+ev(e))};ta({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=eA(this),n=ty(t),r=arguments.length;if(r){t_(n+r);for(var i=n;i--;){var o=i+r;i in t?t[o]=t[i]:uv(t,o)}for(var a=0;a=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw TypeError(ot(e)+" is not iterable")}function uw(){var e=ap(),t=e.m(uw),n=(o0?o0(t):t.__proto__).constructor;function r(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===n||"GeneratorFunction"===(t.displayName||t.name))}var i={throw:1,return:2,break:3,continue:3};function o(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,i[e],t)},delegateYield:function(e,i,o){return t.resultName=i,n(r.d,ub(e),o)},finish:function(e){return n(r.f,e)}},n=function(e,n,i){r.p=t.prev,r.n=t.next;try{return e(n,i)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(uw=function(){return{wrap:function(t,n,r,i){return e.w(o(t),n,r,i&&o6(i).call(i))},isGeneratorFunction:r,mark:e.m,awrap:function(e,t){return new o8(e,t)},AsyncIterator:uh,async:function(e,t,n,i,a){return(r(t)?ud:function(e,t,n,r,i){var o=ud(e,t,n,r,i);return o.next().then(function(e){return e.done?e.value:o.next()})})(o(e),t,n,i,a)},keys:u_,values:ub}})()}function uS(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):uc.resolve(u).then(r,i)}function uk(e){return function(){var t=this,n=arguments;return new uc(function(r,i){var o=e.apply(t,n);function a(e){uS(o,r,i,a,s,"next",e)}function s(e){uS(o,r,i,a,s,"throw",e)}a(void 0)})}}function uE(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function uT(e,t){for(var n=0;ni;)for(var s,u=K(arguments[i++]),c=o?uP(t8(u),o(u)):t8(u),l=c.length,f=0;l>f;)s=c[f++],P&&!L(a,u,s)||(n[s]=u[s]);return n}:uR;ta({target:"Object",stat:!0,arity:2,forced:Object.assign!==uO},{assign:uO});var uL=Q.Object.assign,uM=d(uL),uB=RangeError,uN=T(function(e){var t=tZ(Y(this)),n="",r=tp(e);if(r<0||r===1/0)throw new uB("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}),uU=T("".slice),uj=Math.ceil,uF=function(e){return function(t,n,r){var i,o,a=tZ(Y(t)),s=tg(n),u=a.length,c=void 0===r?" ":tZ(r);return s<=u||""===c?a:((o=uN(c,uj((i=s-u)/c.length))).length>i&&(o=uU(o,0,i)),e?a+o:o+a)}},uG={start:uF(!1),end:uF(!0)}.start,uV=RangeError,uH=isFinite,uK=Math.abs,uW=Date.prototype,uq=uW.toISOString,uY=T(uW.getTime),uZ=T(uW.getUTCDate),uX=T(uW.getUTCFullYear),uQ=T(uW.getUTCHours),uJ=T(uW.getUTCMilliseconds),u$=T(uW.getUTCMinutes),u0=T(uW.getUTCMonth),u1=T(uW.getUTCSeconds),u2=g(function(){return"0385-07-25T07:06:39.999Z"!==uq.call(new Date(-50000000000001))})||!g(function(){uq.call(new Date(NaN))})?function(){if(!uH(uY(this)))throw new uV("Invalid time value");var e=uX(this),t=uJ(this),n=e<0?"-":e>9999?"+":"";return n+uG(uK(e),n?6:4,0)+"-"+uG(u0(this)+1,2,0)+"-"+uG(uZ(this),2,0)+"T"+uG(uQ(this),2,0)+":"+uG(u$(this),2,0)+":"+uG(u1(this),2,0)+"."+uG(t,3,0)+"Z"}:uq;ta({target:"Date",proto:!0,forced:g(function(){return null!==new Date(NaN).toJSON()||1!==L(Date.prototype.toJSON,{toISOString:function(){return 1}})})},{toJSON:function(e){var t=eA(this),n=eF(t,"number");return"number"!=typeof n||isFinite(n)?"toISOString"in t||"Date"!==C(t)?t.toISOString():L(u2,t):null}});Q.JSON||(Q.JSON={stringify:JSON.stringify});var u5=d(function(e,t,n){return w(Q.JSON.stringify,null,arguments)}),u4={exports:{}},u3=g(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),u6=Object.isExtensible,u8=g(function(){u6(1)})||u3?function(e){return!!X(e)&&(!u3||"ArrayBuffer"!==C(e))&&(!u6||u6(e))}:u6,u9=!g(function(){return Object.isExtensible(Object.preventExtensions({}))}),u7=e2.f,ce=!1,ct=eP("meta"),cn=0,cr=function(e){u7(e,ct,{value:{objectID:"O"+cn++,weakData:{}}})},ci=u4.exports={enable:function(){ci.enable=function(){},ce=!0;var e=nf.f,t=T([].splice),n={};n[ct]=1,e(n).length&&(nf.f=function(n){for(var r=e(n),i=0,o=r.length;i1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),cf(o,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),P&&nb(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=cp(t),o=cp(r);r9(e,t,function(e,t){cd(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?r7("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,r7(void 0,!0))},n?"entries":"values",!n,!0),aG(t)}};cl("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},cv);var cg=TypeError,cy=function(e){if("object"==typeof e&&"size"in e&&"has"in e&&"add"in e&&"delete"in e&&"keys"in e)return e;throw new cg(ev(e)+" is not a set")},cm=function(e,t){return 1===t?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}},c_=$("Set"),cb=c_.prototype,cw={Set:c_,add:cm("add",1),has:cm("has",1),remove:cm("delete",1),proto:cb},cS=function(e,t,n){for(var r,i,o=n?e:e.iterator,a=e.next;!(r=L(a,o)).done;)if(void 0!==(i=t(r.value)))return i},ck=function(e,t,n){return n?cS(e.keys(),t,!0):e.forEach(t)},cE=cw.Set,cT=cw.add,cz=function(e){var t=new cE;return ck(e,function(e){cT(t,e)}),t},cA=function(e){return e.size},cC="Invalid size",cI=RangeError,cx=TypeError,cR=Math.max,cD=function(e,t){this.set=e,this.size=cR(t,0),this.has=ey(e.has),this.keys=ey(e.keys)};cD.prototype={getIterator:function(){var e;return{iterator:e=e6(L(this.keys,this.set)),next:e.next,done:!1}},includes:function(e){return L(this.has,this.set,e)}};var cP=function(e){e6(e);var t=+e.size;if(t!=t)throw new cx(cC);var n=tp(t);if(n<0)throw new cI(cC);return new cD(e,n)},cO=cw.has,cL=cw.remove,cM=function(e){var t=cy(this),n=cP(e),r=cz(t);return cA(t)<=n.size?ck(t,function(e){n.includes(e)&&cL(r,e)}):cS(n.getIterator(),function(e){cO(r,e)&&cL(r,e)}),r},cB=function(){return!1},cN=!cB();ta({target:"Set",proto:!0,real:!0,forced:cN},{difference:cM});var cU=cw.Set,cj=cw.add,cF=cw.has,cG=function(e){var t=cy(this),n=cP(e),r=new cU;return cA(t)>n.size?cS(n.getIterator(),function(e){cF(t,e)&&cj(r,e)}):ck(t,function(e){n.includes(e)&&cj(r,e)}),r};ta({target:"Set",proto:!0,real:!0,forced:!cB()},{intersection:cG});var cV=cw.has,cH=function(e){var t=cy(this),n=cP(e);if(cA(t)<=n.size)return!1!==ck(t,function(e){if(n.includes(e))return!1},!0);var r=n.getIterator();return!1!==cS(r,function(e){if(cV(t,e))return iB(r,"normal",!1)})};ta({target:"Set",proto:!0,real:!0,forced:!cB()},{isDisjointFrom:cH});var cK=function(e){var t=cy(this),n=cP(e);return!(cA(t)>n.size)&&!1!==ck(t,function(e){if(!n.includes(e))return!1},!0)};ta({target:"Set",proto:!0,real:!0,forced:!cB()},{isSubsetOf:cK});var cW=cw.has,cq=function(e){var t=cy(this),n=cP(e);if(cA(t)1?arguments[1]:void 0,s=void 0!==a,u=s?e1(a,o>2?arguments[2]:void 0):void 0,c=new e,l=0;return az(i,function(e){var r=s?u(e,l++):e;n?t(c,e6(r)[0],r[1]):t(c,r)}),c}};ta({target:"Set",stat:!0,forced:!0},{from:c1(cw.Set,cw.add,!1)});var c2=function(e,t,n){return function(){for(var r=new e,i=arguments.length,o=0;o1?arguments[1]:void 0);return!1!==ck(t,function(e){if(!n(e,e,t))return!1},!0)}});var c3=eB("iterator"),c6=Object,c8=function(e){if(W(e))return!1;var t=c6(e);return void 0!==t[c3]||"@@iterator"in t||eI(rP,tC(t))},c9=$("Set"),c7=function(e){var t;return X(t=e)&&"number"==typeof t.size&&R(t.has)&&R(t.keys)?e:c8(e)?new c9(e):e};ta({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(e){return L(cM,this,c7(e))}});var le=cw.Set,lt=cw.add;ta({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=cy(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=new le;return ck(t,function(e){n(e,e,t)&<(r,e)}),r}});ta({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=cy(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=ck(t,function(e){if(n(e,e,t))return{value:e}},!0);return r&&r.value}});ta({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return L(cG,this,c7(e))}});ta({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return L(cH,this,c7(e))}});ta({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return L(cK,this,c7(e))}});ta({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(e){return L(cq,this,c7(e))}});var ln=T([].join),lr=T([].push);ta({target:"Set",proto:!0,real:!0,forced:!0},{join:function(e){var t=cy(this),n=void 0===e?",":tZ(e),r=[];return ck(t,function(e){lr(r,e)}),ln(r,n)}});var li=cw.Set,lo=cw.add;ta({target:"Set",proto:!0,real:!0,forced:!0},{map:function(e){var t=cy(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=new li;return ck(t,function(e){lo(r,n(e,e,t))}),r}});var la=TypeError;ta({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=cy(this),n=arguments.length<2,r=n?void 0:arguments[1];if(ey(e),ck(t,function(i){n?(n=!1,r=i):r=e(r,i,i,t)}),n)throw new la("Reduce of empty set with no initial value");return r}});ta({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=cy(this),n=e1(e,arguments.length>1?arguments[1]:void 0);return!0===ck(t,function(e){if(n(e,e,t))return!0},!0)}});ta({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return L(cQ,this,c7(e))}});ta({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return L(c$,this,c7(e))}});var ls=d(c0),lu=i5("Array","concat"),lc=Array.prototype,ll=d(function(e){var t=e.concat;return e===lc||ee(lc,e)&&t===lc.concat?lu:t}),lf=Math.floor,lh=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o0;)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var a=lf(n/2),s=lh(np(e,0,a),t),u=lh(np(e,a),t),c=s.length,l=u.length,f=0,h=0;f=t(s[f],u[h])?s[f++]:u[h++]:f3)){if(lv)return!0;if(ly)return ly<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)lm.push({k:t+r,v:n})}for(lm.sort(function(e,t){return t.v-e.v}),r=0;rtZ(n)?1:-1})),r=ty(o),i=0;i1?arguments[1]:void 0)}});var lx=i5("Array","map"),lR=Array.prototype,lD=d(function(e){var t=e.map;return e===lR||ee(lR,e)&&t===lR.map?lx:t});function lP(e,t){if(t&&("object"==ot(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}var lO=$("Reflect","construct"),lL=Object.prototype,lM=[].push,lB=g(function(){function e(){}return!(lO(function(){},[],e) instanceof e)}),lN=!g(function(){lO(function(){})}),lU=lB||lN;ta({target:"Reflect",stat:!0,forced:lU,sham:lU},{construct:function(e,t){aW(e),e6(t);var n=arguments.length<3?e:aW(arguments[2]);if(lN&&!lB)return lO(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return w(lM,r,t),new(w(aa,e,r))}var i=n.prototype,o=nl(X(i)?i:lL),a=w(e,o,t);return X(a)?a:o}});var lj=Q.Reflect.construct,lF=d(lj);function lG(){try{var e=!Boolean.prototype.valueOf.call(lF(Boolean,[],function(){}))}catch(e){}return(lG=function(){return!!e})()}function lV(e){return(lV=ah?al(o0).call(o0):function(e){return e.__proto__||o0(e)})(e)}function lH(e,t){return(lH=ah?al(ah).call(ah):function(e,t){return e.__proto__=t,e})(e,t)}function lK(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=ae(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),oW(e,"prototype",{writable:!1}),t&&lH(e,t)}var lW=d(lj);var lq=uz(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};uE(this,e),oX(this,"player",void 0);var n=!0;try{n=!t.player}catch(e){}this.player=n?t:t.player},[{key:"playerConfig",get:function(){return this.player.config}},{key:"config",get:function(){var e;return null!==(e=(this.player.config.pluginsConfig||this.player.config||{})[this.constructor.pluginName])&&void 0!==e?e:{}}},{key:"beforePlayerInit",value:function(){}},{key:"afterPlayerInit",value:function(){}},{key:"configDidUpdate",value:function(){}},{key:"beforeDestroy",value:function(){}},{key:"getConfig",value:function(e){var t=this.playerConfig,n=t.baseConfig||{};return((null==n?void 0:n.mediaInfo)||{})[e]||n[e]||t[e]}},{key:"setBaseConfig",value:function(e,t){var n=this.playerConfig.baseConfig||{};"string"==typeof e?n[e]=t:uM(n,e)}},{key:"setSharedConfig",value:function(e,t){var n=this.playerConfig.shared||{};"string"==typeof e?n[e]=t:uM(n,e)}}]),lY=(function(){function e(){var t,n,r;return uE(this,e),t=this,n=e,r=arguments,n=lV(n),lP(t,lG()?lW(n,r||[],lV(t).constructor):n.apply(t,r))}lK(e,lq),uz(e)}(),(vd=lY||{}).Play="play",vd.Pause="pause",vd),lZ=uz(function e(t){uE(this,e),oX(this,"strategyCenter",void 0),oX(this,"ctx",void 0),oX(this,"config",void 0),oX(this,"player",void 0),oX(this,"strategyName",void 0),this.ctx=t.ctx,this.config=t.config,this.strategyName=t.strategyName,this.strategyCenter=t.strategyCenter,this.player=null},[{key:"strategyPriority",get:function(){return this.constructor.strategyPriority}},{key:"getStrategyConfig",value:function(){return this.config}},{key:"setPlayerInst",value:function(e){this.player=e.getInst()}},{key:"onBasePluginCreated",value:function(e){}},{key:"beforePlayerCreate",value:function(e){}},{key:"onPlayerEvent",value:function(e,t){}},{key:"onGlobalEvent",value:function(e,t){}}]),lX=Date,lQ=T(lX.prototype.getTime);ta({target:"Date",stat:!0},{now:function(){return lQ(new lX)}});var lJ=Q.Date.now,l$=d(lJ),l0=((vp=l0||{}).VOD="VOD",vp.LIVE="LIVE",vp),l1=((vv=l1||{}).CN="cn",vv.SG="sg",vv.US="us",vv),l2=((vg=l2||{}).MP4="mp4",vg.DASH="dash",vg),l5=((vy=l5||{}).h265="h265",vy.adaptRange="adaptRange",vy.preload="preload",vy.bitrateSelector="bitrateSelector",vy.testSpeed="testSpeed",vy.degrade="degrade",vy.vodLogger="vodLogger",vy.pcdn="pcdn",vy.urlProcess="urlProcess",vy.abr="abr",vy.bufferControl="bufferControl",vy),l4=((vm=l4||{})[vm.LOWEST=0]="LOWEST",vm[vm.LOW=1]="LOW",vm[vm.MEDIUM=2]="MEDIUM",vm[vm.HIGH=3]="HIGH",vm[vm.HIGHEST=4]="HIGHEST",vm),l3=((v_=l3||{})[v_.urlProcess=4]="urlProcess",v_[v_.degrade=4]="degrade",v_[v_.testSpeed=3]="testSpeed",v_[v_.bitrateSelector=2]="bitrateSelector",v_[v_.h265=0]="h265",v_[v_.adaptRange=0]="adaptRange",v_[v_.preload=0]="preload",v_[v_.vodLogger=0]="vodLogger",v_[v_.pcdn=0]="pcdn",v_[v_.abr=0]="abr",v_[v_.bufferControl=0]="bufferControl",v_),l6={info:3,warn:2,error:1},l8=!1;try{l8=!!window.localStorage.getItem("VESTRATEGY_LOG")}catch(e){}var l9=uz(function e(t,n){var r=this;uE(this,e),oX(this,"logger",void 0),oX(this,"level",void 0),oX(this,"customLogger",void 0),this.level=null==n?void 0:n.level,this.customLogger=null==n?void 0:n.logger,this.logger=function(e,n){var i,o,a,s;try{s="2.0.0-rc.68"}catch(e){s="--"}for(var u,c,l,f,h,d,p,v,g,y,m,_=ll(i=ll(o="[".concat(t,"][")).call(o,s,"][")).call(i,n,"]"),b=arguments.length,w=Array(b>2?b-2:0),S=2;S=l6[e]||"undefined"!=typeof window&&l8)&&(null===(g=window.console)||void 0===g||null===(y=g[e])||void 0===y||y.call.apply(y,ll(m=[g,_]).call(m,w)))}},[{key:"update",value:function(e){var t=e||{},n=t.logger,r=t.level;this.updateLevel(r),this.updateLogger(n)}},{key:"info",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?arguments[1]:void 0)}});var fe=i5("Array","includes"),ft=eB("match"),fn=function(e){var t;return X(e)&&(void 0!==(t=e[ft])?!!t:"RegExp"===C(e))},fr=TypeError,fi=eB("match"),fo=function(e){if(fn(e))throw new fr("The method doesn't accept regular expressions");return e},fa=T("".indexOf);ta({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[fi]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~fa(tZ(Y(this)),tZ(fo(e)),arguments.length>1?arguments[1]:void 0)}});var fs=i5("String","includes"),fu=Array.prototype,fc=String.prototype,fl=d(function(e){var t=e.includes;return e===fu||ee(fu,e)&&t===fu.includes?fe:"string"==typeof e||e===fc||ee(fc,e)&&t===fc.includes?fs:t});function ff(e){return function(t){var n;return null==t?void 0:fl(n=t.split("?")[0].toLowerCase()).call(n,e)}}function fh(e,t){try{"object"===("undefined"==typeof window?"undefined":ot(window))&&window.localStorage&&window.localStorage.setItem(e,t)}catch(e){}}function fd(e){try{return"object"===("undefined"==typeof window?"undefined":ot(window))&&window.localStorage?window.localStorage.getItem(e):null}catch(e){return null}}ff(".m3u8"),ff(".mp4"),ff(".flv"),ff(".sdp"),ff(".mpd");var fp={stringify:function(e,t,n){try{return u5(e,t,n)}catch(e){return""}}},fv={DEVICE_INFO:"VESTRATEGY_DEVICE_INFO",DEVICE_INFO_LIVE:"VESTRATEGY_DEVICE_INFO_LIVE"},fg={SERVICE_CONFIG:"STRATEGY_SERVICE_CONFIG",SERVICE_CONFIG_LIVE:"STRATEGY_SERVICE_CONFIG_LIVE"},fy=new l9("VeStrategy"),fm=uz(function e(t,n){uE(this,e),oX(this,"initStrategyConfig",void 0),oX(this,"serviceStrategyConfigLoader",void 0),oX(this,"serviceStrategyConfig",void 0),oX(this,"appConfig",void 0),oX(this,"videoType",void 0),this.videoType=t.type||l0.VOD,this.initStrategyConfig=t.strategies,this.appConfig=t,this.serviceStrategyConfigLoader=n,fy.update(t.log)},[{key:"getInitStrategyConfig",value:function(){return this.initStrategyConfig}},{key:"getServiceStrategyConfig",value:function(){if(this.serviceStrategyConfig)return this.serviceStrategyConfig;try{var e=fd(l0.LIVE===this.videoType?fg.SERVICE_CONFIG_LIVE:fg.SERVICE_CONFIG);e&&(this.serviceStrategyConfig=JSON.parse(e))}catch(e){}return this.serviceStrategyConfig}},{key:"setServiceStrategyConfig",value:function(e){e&&(this.serviceStrategyConfig=e,fh(l0.LIVE===this.videoType?fg.SERVICE_CONFIG_LIVE:fg.SERVICE_CONFIG,u5(e)),fy.info("ServiceStrategyConfig",e))}},{key:"fetchStrategyConfig",value:(vb=uk(uw().mark(function e(){var t,n;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.needFetchStrategyConfig()){e.next=1;break}return fy.info("UseLocalStrategyConfig"),e.abrupt("return");case 1:if(e.prev=1,!this.serviceStrategyConfigLoader){e.next=3;break}return e.next=2,this.serviceStrategyConfigLoader.fetch();case 2:t=e.sent;case 3:e.next=5;break;case 4:e.prev=4,n=e.catch(1),fy.warn("FetchStrategyConfigError",u5({message:null==n?void 0:n.message,name:null==n?void 0:n.name}));case 5:this.setServiceStrategyConfig(t);case 6:case"end":return e.stop()}},e,this,[[1,4]])})),function(){return vb.apply(this,arguments)})},{key:"updateStrategyConfig",value:function(){}},{key:"getStrategyConfig",value:function(){}},{key:"getStrategyConfigByName",value:function(){}},{key:"getAppConfig",value:function(){return this.appConfig}},{key:"needFetchStrategyConfig",value:function(){var e;return this.getServiceStrategyConfig(),!this.serviceStrategyConfig||!this.serviceStrategyConfig.use_local_cache||!!(this.serviceStrategyConfig.local_cache_expired_at&&l$()>this.serviceStrategyConfig.local_cache_expired_at)||this.serviceStrategyConfig.cache_key!==(null===(e=this.serviceStrategyConfigLoader)||void 0===e?void 0:e.getCacheKey())}}]),f_=d(oK),fb=function(e,t,n){var r,i,o;return r=e,i="symbol"!==ot(t)?t+"":t,o=n,i in r?f_(r,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[i]=o,n},fw=uz(function e(t){uE(this,e),fb(this,"options"),fb(this,"scores"),this.options=t,this.scores=[],this._init()},[{key:"_init",value:function(){var e,t=this;uC(e=uI(this.options.plugins)).call(e,function(e){var n=t.options.plugins[e];n.ignore||(n.cls&&(n.instance=new n.cls(n)),n.instance&&t.scores.push(new uA(function(t){n.instance.getScore().then(function(r){t({key:e,factor:n.factor,val:r})})})))})}},{key:"getScore",value:function(){var e=this;return new uA(function(t){uA.all(e.scores).then(function(e){var n={},r=0,i=0;uC(e).call(e,function(e){var t=e.factor;e.val.score>0&&(i+=t)}),i=0===i?1:i;for(var o=0;o1e3)try{e.off("timeupdate",o);var a=e.video.getVideoPlaybackQuality();localStorage.setItem("player_".concat(t,"_fps"),a.totalVideoFrames-i+"")}catch(e){}}else n.bufferLength>1&&(i=e.video.getVideoPlaybackQuality().totalVideoFrames,r=l$())}else e.off("timeupdate",o)};e.on("timeupdate",o)}}},{key:"bufferLength",get:function(){var e=this._player.getBufferedRange();if(!this._player.video)return 0;var t=this._player.video.currentTime,n=e[1]-Math.max(e[0],t);return Math.max(0,n)}}])}(),fA=Math.log,fC=Math.LN2,fI=Math.log2||function(e){return fA(e)/fC};ta({target:"Math",stat:!0},{log2:fI});var fx=Q.Math.log2,fR=d(fx),fD=new(uz(function e(){uE(this,e)},[{key:"getScore",value:function(){return new uA(function(e){var t=navigator.hardwareConcurrency,n=0;if(t>0){var r=fR(t);n=r<=2?3*r:r<=3?1.6*(r-2)+6:.523*(r-3)+7.6}e({score:n,origin:t})})}}])),fP=Math.log,fO=Math.LOG10E,fL=Math.log10||function(e){return fP(e)*fO};ta({target:"Math",stat:!0},{log10:fL});var fM=Q.Math.log10,fB=d(fM),fN=function(e,t,n){var r,i,o;return r=e,i="symbol"!==ot(t)?t+"":t,o=n,i in r?f_(r,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[i]=o,n},fU=new(uz(function e(){uE(this,e),fN(this,"_worker"),fN(this,"_getScoreCallback",function(){})},[{key:"getScore",value:function(){return new uA(function(e){try{var t=new Image;t.src="//lf6-cdn-tos.douyinstatic.com/obj/venus/pc-theme/spring/20230411-162827.jpeg",t.onload=function(){var n=l$();"function"==typeof t.decode?t.decode().then(function(){var t=1e3/(l$()-n),r=0;if(t>0){var i=fB(t);r=i<=1?6*i:i<=2?1.6*(i-1)+6:2.4*(i-2)+7.6}e({score:r,origin:t})}):e({score:0,origin:-1})}}catch(t){e({score:0,origin:-1})}})}}]));ta({target:"Array",proto:!0},{fill:function(e){for(var t=eA(this),n=ty(t),r=arguments.length,i=t$(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:t$(o,n);a>i;)t[i++]=e;return t}});var fj=i5("Array","fill"),fF=Array.prototype,fG=d(function(e){var t=e.fill;return e===fF||ee(fF,e)&&t===fF.fill?fj:t}),fV=new(uz(function e(){uE(this,e)},[{key:"_getOrigin",value:function(){var e=new Uint8Array(3686400);fG(e).call(e,8);var t=performance.now();return 1e3/(performance.now()-t)}},{key:"getScore",value:function(){var e=this;return new uA(function(t){t({score:0,origin:e._getOrigin()})})}}])),fH=new(uz(function e(){uE(this,e)},[{key:"getScore",value:function(){return new uA(function(e){e({score:0,origin:navigator.deviceMemory})})}}])),fK=new(uz(function e(){uE(this,e)},[{key:"getScore",value:function(){return new uA(function(e){var t,n=null==(t=null==navigator?void 0:navigator.connection)?void 0:t.downlink,r=0;n>0&&n<1e6&&(r=n<1?60*n:n<5?.4*(n-1)+6.01:.02*(n-5)+7.61),e({score:r,origin:n})})}}])),fW=TypeError,fq="Reduce of empty array with no initial value",fY=function(e){return function(t,n,r,i){var o=eA(t),a=K(o),s=ty(o);if(ey(n),0===s&&r<2)throw new fW(fq);var u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw new fW(fq)}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},fZ={left:fY(!1),right:fY(!0)}.left;ta({target:"Array",proto:!0,forced:!aj&&eu>79&&eu<83||!ok("reduce")},{reduce:function(e){var t=arguments.length;return fZ(this,e,t,t>1?arguments[1]:void 0)}});var fX=i5("Array","reduce"),fQ=Array.prototype,fJ=d(function(e){var t=e.reduce;return e===fQ||ee(fQ,e)&&t===fQ.reduce?fX:t}),f$=new(uz(function e(){uE(this,e)},[{key:"_getBandwidth",value:function(){if(!performance.getEntries)return -1;var e,t=lC(e=performance.getEntries()).call(e,function(e){var t=e.initiatorType,n=e.decodedBodySize;return"img"===t&&n>0}),n=fJ(t).call(t,function(e,t){return e+1e3*t.decodedBodySize/(t.responseEnd-t.responseStart)},0);return t.length?n/t.length/1024:0}},{key:"getScore",value:function(){var e=this;return new uA(function(t,n){try{var r=e._getBandwidth(),i=0;r>0&&r<1e6&&(i=r<1?60*performance_speed:r<5?.4*(performance_speed-1)+6.01:.02*(performance_speed-5)+7.61),t({score:i,origin:r})}catch(e){t({score:0,origin:-1})}})}}])),f0=((vw=f0||{}).H264="h264",vw.H265="h265",vw),f1=function(e,t,n){var r,i,o;return r=e,i="symbol"!==ot(t)?t+"":t,o=n,i in r?f_(r,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[i]=o,n},f2=uz(function e(t){uE(this,e),f1(this,"_origin"),f1(this,"_codec"),this._codec=t},[{key:"_getOrigin",value:function(){try{var e=localStorage.getItem("player_".concat(this._codec,"_fps"))||-1;return Number(e)}catch(e){return -1}}},{key:"getScore",value:function(){var e=this;return new uA(function(t){var n=e._origin||e._getOrigin(),r=0;n>0&&n<=120&&(r=n<=30?.2*n:n<=60?.0533*(n-30)+6:.04*(n-60)+7.6),t({score:r,origin:n})})}}]),f5=new(function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[t],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,f2),uz(e)}())(f0.H264),f4={plugins:{cpu:{cls:fS,factor:8,plugins:{cpu_core_number:{factor:4,instance:fD},decodeImg:{factor:3,instance:fU}}},memory:{cls:fk,factor:0,plugins:{copy:{factor:5,instance:fV},usage:{factor:5,instance:fH}}},net:{cls:fE,factor:9,plugins:{downlink:{factor:5,instance:fK},performance:{factor:4,instance:f$}}},render:{cls:fz,factor:0,plugins:{avc:{factor:5,instance:f5},hevc:{factor:5,instance:new(function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[t],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,f2),uz(e)}())(f0.H265)}}}}},f3=function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[uM({},f4,t)],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,fw),uz(e,[{key:"setPlayer",value:function(e,t){var n,r;(null==(n=this.options.plugins.render)?void 0:n.instance)&&(null==(r=this.options.plugins.render)||r.instance.setPlayer(e,t))}}])}(),f6=" \n\v\f\r \xa0               \u2028\u2029\uFEFF",f8=T("".replace),f9=RegExp("^["+f6+"]+"),f7=RegExp("(^|[^"+f6+"])["+f6+"]+$"),he=function(e){return function(t){var n=tZ(Y(t));return 1&e&&(n=f8(n,f9,"")),2&e&&(n=f8(n,f7,"$1")),n}},ht={start:he(1),end:he(2),trim:he(3)},hn=ht.trim,hr=v.parseInt,hi=v.Symbol,ho=hi&&hi.iterator,ha=/^[+-]?0x/i,hs=T(ha.exec),hu=8!==hr(f6+"08")||22!==hr(f6+"0x16")||ho&&!g(function(){hr(Object(ho))})?function(e,t){var n=hn(tZ(e));return hr(n,t>>>0||(hs(ha,n)?16:10))}:hr;ta({global:!0,forced:parseInt!==hu},{parseInt:hu});var hc=Q.parseInt,hl=d(hc),hf=rN.PROPER,hh="​\x85᠎",hd=ht.trim;ta({target:"String",proto:!0,forced:(vS="trim",g(function(){return!!f6[vS]()||hh[vS]()!==hh||hf&&f6[vS].name!==vS}))},{trim:function(){return hd(this)}});var hp=i5("String","trim"),hv=String.prototype,hg=d(function(e){var t=e.trim;return"string"==typeof e||e===hv||ee(hv,e)&&t===hv.trim?hp:t}),hy=/ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,hm=/ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,h_="OpenGL Engine",hb="Unknow",hw=((vk=hw||{}).CpuDeriver="CpuDeriver",vk.Intel="Intel",vk.Nvidia="NVIDIA",vk.Amd="AMD",vk.Apple="Apple",vk[vk.Unknow=hb]="Unknow",vk);function hS(e){return"NVIDIA"===e?4318:"AMD"===e?4098:"Intel"===e?32902:0}var hk=ht.trim,hE=T("".charAt),hT=v.parseFloat,hz=v.Symbol,hA=hz&&hz.iterator,hC=1/hT(f6+"-0")!=-Infinity||hA&&!g(function(){hT(Object(hA))})?function(e){var t=hk(tZ(e)),n=hT(t);return 0===n&&"-"===hE(t,0)?-0:n}:hT;ta({global:!0,forced:parseFloat!==hC},{parseFloat:hC});var hI=Q.parseFloat,hx=d(hI),hR="g_ven";function hD(e){return 0===e?0:-1===e?-1:hx(fR(e).toFixed(2))}var hP=[],hO=[],hL=[];function hM(){return(hM=uk(uw().mark(function e(t,n){var r,i;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==hw.Intel){e.next=2;break}if(!hP.length){e.next=1;break}return e.abrupt("return",hP);case 1:r=n.intelPath;case 2:if(t!==hw.Nvidia){e.next=4;break}if(!hO.length){e.next=3;break}return e.abrupt("return",hO);case 3:r=n.nvidiaPath;case 4:if(t!==hw.Amd){e.next=6;break}if(!hL.length){e.next=5;break}return e.abrupt("return",hL);case 5:r=n.amdPath;case 6:if(r){e.next=7;break}return e.abrupt("return",uA.resolve([]));case 7:return e.prev=7,e.next=8,fetch(r).then(function(e){return e.text()});case 8:return i=function(e,t){var n,r;return n=t===hw.Intel?lD(r=e.split("\n")).call(r,function(e){return"Intel(R) ".concat(e)}):e.split("\n"),lD(n).call(n,function(e){return e.split("|")})}(e.sent,t),t===hw.Intel&&(hP=i),t===hw.Nvidia&&(hO=i),t===hw.Amd&&(hL=i),e.abrupt("return",i);case 9:return e.prev=9,e.catch(7),e.abrupt("return",[]);case 10:case"end":return e.stop()}},e,null,[[7,9]])}))).apply(this,arguments)}var hB="";function hN(e){var t,n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,y,m,_;try{;t=(c=(r=n=e||hj.getGPUVendor(),(i=/(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple)/.exec(r))?"Radeon"===i[0]?"AMD":"SwiftShader"===i[0]?"CpuDeriver":i[0]:hw.Unknow))===hw.Unknow||"CpuDeriver"===c?{vendor:c,vendorId:0,model:hb,backupModel:hb,api:hb}:/^ANGLE/.test(n)?(l=c,f=n,y=hb,m=hb,_=hb,"Intel"!==l&&"NVIDIA"!==l||(h=hy.exec(f)),"AMD"!==l&&"Apple"!==l||(h=hm.exec(f)),(null==h?void 0:h[1])&&(null==h?void 0:h[2])&&(y=hg(d=h[1].replace(/(AMD|NVIDIA)/,"")).call(d),_=hg(p=h[2]).call(p)),m="Intel"===l?y=hg(v=y.split(h_)[0]).call(v):hg(g=y.split(h_)[0]).call(g),{vendor:l,vendorId:hS(l),model:y,backupModel:m,api:_}):"Intel"===c?{vendor:c,vendorId:hS(c),model:hg(s=n.split(h_)[0]).call(s),backupModel:hg(u=n.split(h_)[0]).call(u),api:hb}:{vendor:c,vendorId:hS(c),model:hg(o=n.replace(/(AMD|NVIDIA)/,"")).call(o),backupModel:hg(a=n.split(h_)[0].replace(/(AMD|NVIDIA)/,"")).call(a),api:hb}}catch(e){return null}return t}var hU=uz(function e(){uE(this,e)},null,[{key:"setConfig",value:function(e){hU.cfg=e}},{key:"getGPUVendor",value:function(){return hB||(hB=function(){try{var e=localStorage.getItem(hR)||"";if(e)return e;var t,n=document.createElement("canvas").getContext("webgl");if(n)return(e=(t=n.getExtension("WEBGL_debug_renderer_info"))?n.getParameter(t.UNMASKED_RENDERER_WEBGL):"")&&localStorage.setItem(hR,e),e}catch(e){}return""}())}},{key:"parseVendorAsync",value:function(e){var t,n,r=hN(e);if(!r)return uA.resolve(null);if(!hU.cfg)throw Error("need specify config, call setConfig() method");return(t=r,n=hU.cfg,t?(function(e,t){return hM.apply(this,arguments)})(t.vendor,n).then(function(e){return function(e,t){var n=lC(e).call(e,function(e){return e[0]===t.model});n.length||(n=lC(e).call(e,function(e){return e[0]===t.backupModel})),n.length||t.vendor!==hw.Intel||/^Intel(R)/.test(t.model)||(n=lC(e).call(e,function(e){return e[0]==="Intel(R) "+t.model}));var r="-1";if(n.length){var i=n[0][1];r="-1"===i?"0":i}return hl(r)}(e,t)}).then(hD):uA.resolve(0)).then(function(e){return oJ(oJ({},r||{}),{},{score:e})}).catch(function(){return null})}}]),hj=hU;function hF(){var e=!1;if("undefined"==typeof MediaSource||!MediaSource.isTypeSupported||function(){if("undefined"==typeof navigator)return!1;var e=navigator.userAgent.match(/Edg\/(\d+)\./);if(e&&e.length>=2){var t=hl(e[1]);return t>=117&&t<=122}return!1}())return e;if(e=MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"')||MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"')){var t=hN();e=!!t&&t.vendor!==hw.CpuDeriver}return e}function hG(){return(hG=uk(uw().mark(function e(t){var n,r,i,o,a,s,u,c,l,f;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=(n=uM({url:"",minDroppedFramesRate:0,minTotalVideoFrames:0},t)).url,i=n.minDroppedFramesRate,o=n.minTotalVideoFrames,(l=new uA(function(e){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1001;e(oJ({status:!1,errCode:t,robustErr:2101===t||2001===t||3e3===t},(arguments.length>1?arguments[1]:void 0)||{}))}r&&(0!==i||0!==o)?(s=function(){var n="";try{if(!a||!a.getVideoPlaybackQuality)return t(2001);var r=a.getVideoPlaybackQuality(),s=r.totalVideoFrames,u=r.droppedVideoFrames,c=u/s,l={droppedFrameRate:c,droppedVideoFrames:u,totalVideoFrames:s};return void((i?c<=i:!!o&&s>o)?e(oJ({status:!0},l)):t(3e3,l))}catch(e){n=(null==e?void 0:e.message)||e||"empty err msg"}t(2200,{errMsg:n})},u=function(){var e,n,r=(null===(e=a)||void 0===e?void 0:e.error)||{code:-1,message:""};t(2e3,{errMsg:ll(n="".concat(r.code,"-")).call(n,r.message)})},c=function(){var e,n=null===(e=a)||void 0===e?void 0:e.play();n&&n.then(function(e){}).catch(function(e){var n=e.message,r=2100;/no supported source/gi.test(n)||/The media resource indicated by the src attribute or assigned media provider object was not suitable/gi.test(n)||/NotSupportedError/gi.test(n)?r=2101:/video-only background media was paused to save power/gi.test(n)?r=2103:(/the user didn't interact with the document first/gi.test(n)||/user denied permission/gi.test(n))&&(r=2102),t(r,{errMsg:n})})},(a=function(e){var t=document.createElement("video");return t.style.cssText="width:50px;height:50px;position:absolute;top:0;left:0;z-index:999999;opacity:.001;pointer-events:none;",t.muted=!0,t.autoplay=!1,t.src=e,t}(r)).addEventListener("loadedmetadata",c,!1),a.addEventListener("ended",s,!1),a.addEventListener("error",u,!1),a.load(),document.body.append(a)):t(1e3)})).finally(function(){a&&(s&&u&&c&&(a.removeEventListener("loadedmetadata",c,!1),a.removeEventListener("ended",s,!1),a.removeEventListener("error",u,!1),s=void 0,u=void 0,c=void 0),document.body.removeChild(a),a=void 0)}),e.next=1,l;case 1:return f=e.sent,e.abrupt("return",f);case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}vE="cfg",vT=null,vz=hj,vA="symbol"!==ot("cfg")?vE+"":vE,vC=null,vA in vz?f_(vz,vA,{enumerable:!0,configurable:!0,writable:!0,value:vC}):vz[vA]=vC;var hV=nG.find,hH="find",hK=!0;hH in[]&&[,][hH](function(){hK=!1}),ta({target:"Array",proto:!0,forced:hK},{find:function(e){return hV(this,e,arguments.length>1?arguments[1]:void 0)}});var hW=i5("Array","find"),hq=Array.prototype,hY=d(function(e){var t=e.find;return e===hq||ee(hq,e)&&t===hq.find?hW:t}),hZ=nG.some;ta({target:"Array",proto:!0,forced:!ok("some")},{some:function(e){return hZ(this,e,arguments.length>1?arguments[1]:void 0)}});var hX=i5("Array","some"),hQ=Array.prototype,hJ=d(function(e){var t=e.some;return e===hQ||ee(hQ,e)&&t===hQ.some?hX:t}),h$=t1.indexOf,h0=I([].indexOf),h1=!!h0&&1/h0([1],1,-0)<0;ta({target:"Array",proto:!0,forced:h1||!ok("indexOf")},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return h1?h0(this,e,t)||0:h$(this,e,t)}});var h2=i5("Array","indexOf"),h5=Array.prototype,h4=function(e){var t=e.indexOf;return e===h5||ee(h5,e)&&t===h5.indexOf?h2:t},h3=d(h4),h6=d(h4),h8=tH("splice"),h9=Math.max,h7=Math.min;ta({target:"Array",proto:!0,forced:!h8},{splice:function(e,t){var n,r,i,o,a,s,u=eA(this),c=ty(u),l=t$(e,c),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=h7(h9(tp(t),0),c-l)),t_(c+n-r),i=tG(u,r),o=0;oc-r+n;o--)uv(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:uv(u,s);for(o=0;o0&&n[1]||""}},{key:"getSecondMatch",value:function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""}},{key:"matchAndReturnConst",value:function(e,t,n){if(e.test(t))return n}},{key:"getWindowsVersionName",value:function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}},{key:"getMacOSVersionName",value:function(e){var t,n,r=lD(t=dn(n=e.split(".")).call(n,0,2)).call(t,function(e){return hl(e,10)||0});if(r.push(0),10===r[0])switch(r[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}},{key:"getAndroidVersionName",value:function(e){var t,n,r=lD(t=dn(n=e.split(".")).call(n,0,2)).call(t,function(e){return hl(e,10)||0});if(r.push(0),!(1===r[0]&&r[1]<5))return 1===r[0]&&r[1]<6?"Cupcake":1===r[0]&&r[1]>=6?"Donut":2===r[0]&&r[1]<2?"Eclair":2===r[0]&&2===r[1]?"Froyo":2===r[0]&&r[1]>2?"Gingerbread":3===r[0]?"Honeycomb":4===r[0]&&r[1]<1?"Ice Cream Sandwich":4===r[0]&&r[1]<4?"Jelly Bean":4===r[0]&&r[1]>=4?"KitKat":5===r[0]?"Lollipop":6===r[0]?"Marshmallow":7===r[0]?"Nougat":8===r[0]?"Oreo":9===r[0]?"Pie":void 0}},{key:"getVersionPrecision",value:function(e){return e.split(".").length}},{key:"compareVersions",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),a=Math.max(i,o),s=0,u=lD(e).call(e,[t,n],function(t){var n,r=a-e.getVersionPrecision(t),i=t+Array(r+1).join(".0");return dr(n=lD(e).call(e,i.split("."),function(e){return Array(20-e.length).join("0")+e})).call(n)});for(r&&(s=a-Math.min(i,o)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]1?i-1:0),a=1;a=3},describe:function(){return{type:ds.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:ds.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:ds.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:ds.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:ds.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:ds.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:ds.tv}}}],dv=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:dc.Blink};var t=dl.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:dc.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:dc.Trident},n=dl.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:dc.Presto},n=dl.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:dc.Gecko},n=dl.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:dc.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:dc.WebKit},n=dl.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],dg=uz(function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(uE(this,e),null==t||""===t)throw Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},!0!==n&&this.parse()},[{key:"getUA",value:function(){return this._ua}},{key:"test",value:function(e){return e.test(this._ua)}},{key:"parseBrowser",value:function(){var e=this;this.parsedResult.browser={};var t=hY(dl).call(dl,dh,function(t){var n;if("function"==typeof t.test)return t.test(e);if(ux(t.test))return hJ(n=t.test).call(n,function(t){return e.test(t)});throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}},{key:"getBrowser",value:function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}},{key:"getBrowserName",value:function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}},{key:"getBrowserVersion",value:function(){return this.getBrowser().version}},{key:"getOS",value:function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}},{key:"parseOS",value:function(){var e=this;this.parsedResult.os={};var t=hY(dl).call(dl,dd,function(t){var n;if("function"==typeof t.test)return t.test(e);if(ux(t.test))return hJ(n=t.test).call(n,function(t){return e.test(t)});throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}},{key:"getOSName",value:function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""}},{key:"getOSVersion",value:function(){return this.getOS().version}},{key:"getPlatform",value:function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}},{key:"getPlatformType",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""}},{key:"parsePlatform",value:function(){var e=this;this.parsedResult.platform={};var t=hY(dl).call(dl,dp,function(t){var n;if("function"==typeof t.test)return t.test(e);if(ux(t.test))return hJ(n=t.test).call(n,function(t){return e.test(t)});throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}},{key:"getEngine",value:function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}},{key:"getEngineName",value:function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}},{key:"parseEngine",value:function(){var e=this;this.parsedResult.engine={};var t=hY(dl).call(dl,dv,function(t){var n;if("function"==typeof t.test)return t.test(e);if(ux(t.test))return hJ(n=t.test).call(n,function(t){return e.test(t)});throw Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}},{key:"parse",value:function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}},{key:"getResult",value:function(){return dl.assign({},this.parsedResult)}},{key:"satisfies",value:function(e){var t=this,n={},r=0,i={},o=0,a=uI(e);if(uC(a).call(a,function(t){var a=e[t];"string"==typeof a?(i[t]=a,o+=1):"object"===ot(a)&&(n[t]=a,r+=1)}),r>0){var s=uI(n),u=hY(dl).call(dl,s,function(e){return t.isOS(e)});if(u){var c=this.satisfies(n[u]);if(void 0!==c)return c}var l=hY(dl).call(dl,s,function(e){return t.isPlatform(e)});if(l){var f=this.satisfies(n[l]);if(void 0!==f)return f}}if(o>0){var h=uI(i),d=hY(dl).call(dl,h,function(e){return t.isBrowser(e,!0)});if(void 0!==d)return this.compareVersion(i[d])}}},{key:"isBrowser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=dl.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n}},{key:"compareVersion",value:function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),h6(t).call(t,dl.compareVersions(i,n,r))>-1}},{key:"isOS",value:function(e){return this.getOSName(!0)===String(e).toLowerCase()}},{key:"isPlatform",value:function(e){return this.getPlatformType(!0)===String(e).toLowerCase()}},{key:"isEngine",value:function(e){return this.getEngineName(!0)===String(e).toLowerCase()}},{key:"is",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}},{key:"some",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return hJ(t).call(t,function(t){return e.is(t)})}}]),dy=uz(function e(){uE(this,e)},null,[{key:"getParser",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)throw Error("UserAgent should be a string");return new dg(e,t)}},{key:"parse",value:function(e){return new dg(e).getResult()}},{key:"BROWSER_MAP",get:function(){return da}},{key:"ENGINE_MAP",get:function(){return dc}},{key:"OS_MAP",get:function(){return du}},{key:"PLATFORMS_MAP",get:function(){return ds}}]),dm=uz(function e(t){uE(this,e),oX(this,"featureList",void 0),oX(this,"videoType",void 0),this.videoType=t.type||l0.VOD,this.featureList=oJ(oJ(oJ(oJ({deviceId:null==t?void 0:t.deviceId},this.initSync()),this.getGPUInfo()),this.getLocalDeviceMarkInfo()),this.getH265FeatureList())},[{key:"initSync",value:function(){return oJ({},this.getBrowserInfo())}},{key:"updateFeatureList",value:function(e){return this.featureList=oJ(oJ({},this.featureList),e)}},{key:"getFeatureList",value:function(){return this.featureList}},{key:"getH265FeatureList",value:function(){return{isHevcSupported:hF()}}},{key:"getLocalDeviceMarkInfo",value:function(){var e=fd(this.videoType===l0.LIVE?fv.DEVICE_INFO_LIVE:fv.DEVICE_INFO),t={cpuScore:-1,netScore:-1,renderScore:-1};if(!e)return t;try{var n=JSON.parse(e);return{cpuScore:n.cpuScore,netScore:n.netScore,renderScore:n.renderScore}}catch(e){}return t}},{key:"getDeviceMarkInfoAsync",value:(vI=uk(uw().mark(function e(){var t,n,r,i,o,a,s;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=new f3({}),e.next=1,t.getScore();case 1:if(s=e.sent){e.next=2;break}s={};case 2:return r=(n=s).cpu,i=n.net,o=n.render,a={cpuScore:(null==r?void 0:r.score)||-1,netScore:(null==i?void 0:i.score)||-1,renderScore:(null==o?void 0:o.score)||-1},fh(this.videoType===l0.LIVE?fv.DEVICE_INFO_LIVE:fv.DEVICE_INFO,u5(a)),this.updateFeatureList(a),e.abrupt("return",a);case 3:case"end":return e.stop()}},e,this)})),function(){return vI.apply(this,arguments)})},{key:"getBrowserInfo",value:function(){var e=dy.getParser(navigator.userAgent);return{browserVersion:e.getBrowserVersion()||"unknown browser version",browserName:e.getBrowserName(),cpuCore:navigator.hardwareConcurrency,osName:e.getOSName(),osVersion:e.getOSVersion(),platformType:e.getPlatformType(),engineName:e.getEngineName()}}},{key:"getGPUInfo",value:function(){try{var e=f.Z.parseVendor(),t=f.Z.getGPUVendor(),n=fl(t).call(t,"SwiftShader");return{gpuScore:(null==e?void 0:e.score)||-1,isCloseGPU:n}}catch(e){return{gpuScore:-1,isCloseGPU:!1}}}}]),d_=i5("Array","values"),db=Array.prototype,dw={DOMTokenList:!0,NodeList:!0},dS=d(function(e){var t=e.values;return e===db||ee(db,e)&&t===db.values||eI(dw,tC(e))?d_:t}),dk=((vx=dk||{}).Equal="=",vx.NotEqual="≠",vx.Greater=">",vx.GreaterOrEqual="≥",vx.Less="<",vx.LessOrEqual="≤",vx),dE=oX(oX(oX(oX(oX(oX({},"=",{validate:function(e,t){var n;return ux(dS(e))?fl(n=dS(e)).call(n,t):dS(e)===t}}),"≠",{validate:function(e,t){var n;return ux(dS(e))?!fl(n=dS(e)).call(n,t):dS(e)!==t}}),">",{validate:function(e,t){return!ux(dS(e))&&"boolean"!=typeof dS(e)&&t>dS(e)}}),"≥",{validate:function(e,t){return!ux(dS(e))&&"boolean"!=typeof dS(e)&&t>=dS(e)}}),"<",{validate:function(e,t){return!ux(dS(e))&&"boolean"!=typeof dS(e)&&t1?arguments[1]:void 0);return!1!==dY(t,function(e,r){if(!n(e,r,t))return!1},!0)}});var dZ=dC.Map,dX=dC.set;ta({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=dM(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=new dZ;return dY(t,function(e,i){n(e,i,t)&&dX(r,i,e)}),r}});ta({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=dM(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=dY(t,function(e,r){if(n(e,r,t))return{value:e}},!0);return r&&r.value}});ta({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=dM(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=dY(t,function(e,r){if(n(e,r,t))return{key:r}},!0);return r&&r.key}});ta({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===dY(dM(this),function(t){var n,r;if((n=t)===(r=e)||n!=n&&r!=r)return!0},!0)}});ta({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=dY(dM(this),function(t,n){if(t===e)return{key:n}},!0);return t&&t.key}});var dQ=dC.Map,dJ=dC.set;ta({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=dM(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=new dQ;return dY(t,function(e,i){dJ(r,n(e,i,t),e)}),r}});var d$=dC.Map,d0=dC.set;ta({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=dM(this),n=e1(e,arguments.length>1?arguments[1]:void 0),r=new d$;return dY(t,function(e,i){d0(r,i,n(e,i,t))}),r}});var d1=dC.set;ta({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=dM(this),n=arguments.length,r=0;r1?arguments[1]:void 0);return!0===dY(t,function(e,r){if(n(e,r,t))return!0},!0)}});var d5=TypeError,d4=dC.get,d3=dC.has,d6=dC.set;ta({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=dM(this),r=arguments.length;ey(t);var i=d3(n,e);if(!i&&r<3)throw new d5("Updating absent value");var o=i?d4(n,e):ey(r>2?arguments[2]:void 0)(e,n);return d6(n,e,t(o,e,n)),n}});var d8=TypeError,d9=function(e,t){var n,r=e6(this),i=ey(r.get),o=ey(r.has),a=ey(r.set),s=arguments.length>2?arguments[2]:void 0;if(!R(t)&&!R(s))throw new d8("At least one callback required");return L(o,r,e)?(n=L(i,r,e),R(t)&&L(a,r,e,n=t(n))):R(s)&&L(a,r,e,n=s()),n};ta({target:"Map",proto:!0,real:!0,forced:!0},{upsert:d9});ta({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:d9});var d7=d(dO),pe=d(iQ),pt=uz(function e(t){uE(this,e),oX(this,"inst",void 0),this.inst=t.inst},[{key:"getInst",value:function(){return this.inst}},{key:"getPlayerConfig",value:function(){var e;return null===(e=this.inst)||void 0===e?void 0:e.playerConfig}},{key:"getStrategyConfig",value:function(){var e;return null===(e=this.inst)||void 0===e?void 0:e.strategyConfig}}]),pn=uz(function e(){uE(this,e),oX(this,"players",void 0),this.players=new d7},[{key:"get",value:function(e){return this.players.get(e)}},{key:"addPlayer",value:function(e,t){return!(!e||this.players.get(e))&&(this.players.set(e,new pt(t)),!0)}},{key:"getPlayerList",value:function(){var e;return pe(dS(e=this.players).call(e))}},{key:"removePlayer",value:function(e){return!(!e||!this.players.get(e))&&(this.players.delete(e),!0)}}]),pr=uz(function e(t){uE(this,e),oX(this,"ctx",void 0),oX(this,"strategyMap",new d7),this.ctx=t},[{key:"registerStrategy",value:function(e){var t;return!(null==e||null===(t=e.Strategy)||void 0===t||!t.strategyName)&&(this.strategyMap.get(e.Strategy.strategyName)||this.strategyMap.set(e.Strategy.strategyName,{inst:new e.Strategy({ctx:this.ctx,config:e.config,strategyName:e.Strategy.strategyName,strategyCenter:this})}),!0)}},{key:"getStrategyInstByName",value:function(e){var t,n;return e&&null!==(t=this.strategyMap.get(e))&&void 0!==t&&t.inst&&(null===(n=this.strategyMap.get(e))||void 0===n?void 0:n.inst)||null}},{key:"getStrategyList",value:function(){var e,t;return lD(e=pe(dS(t=this.strategyMap).call(t))).call(e,function(e){return e.inst})}},{key:"getStrategyByName",value:function(e){return e&&this.strategyMap.get(e)?this.strategyMap.get(e):null}},{key:"registerAlgorithm",value:function(){}},{key:"getStrategyInstByNameAsync",value:function(){}},{key:"loadStrategySrcAsync",value:function(){}}]),pi=uz(function e(t){uE(this,e),oX(this,"tracker",void 0),oX(this,"_tea",void 0),oX(this,"ctx",void 0),oX(this,"options",void 0),this.ctx=t.cxt,this.options=t,this.initTracker(t),this.bindABVersion()},[{key:"bindTrackerABVersion",value:function(e){var t,n,r,i=this;!this._tea&&e&&null!==(t=this.options)&&void 0!==t&&null!==(t=t.trackInfo)&&void 0!==t&&t.enableABVersion&&(this._tea=e,null===(n=this._tea)||void 0===n||null===(r=n.filterEvent)||void 0===r||r.call(n,function(e){var t,n;return null==e||null===(t=e[0])||void 0===t||null===(t=t.events)||void 0===t||null===(n=uC(t))||void 0===n||n.call(t,function(e){var t,n,r,o=((null===(t=i.ctx)||void 0===t||null===(t=t.dataCenter)||void 0===t?void 0:t.getServiceStrategyConfig())||{}).libra_ab_version;!o||!e||null!==(n=e.ab_sdk_version)&&void 0!==n&&fl(n).call(n,o)||(e.ab_sdk_version=e.ab_sdk_version?ll(r="".concat(e.ab_sdk_version,",")).call(r,o):"".concat(o))}),e}))}},{key:"track",value:function(e,t){var n,r;"function"==typeof this.tracker?this.tracker(e,t):null===(n=this.tracker)||void 0===n||null===(r=n.event)||void 0===r||r.call(n,e,t)}},{key:"initTracker",value:function(e){var t,n;if(fl(t=[l0.LIVE,l0.VOD]).call(t,e.type)&&null!==(n=e.trackInfo)&&void 0!==n&&n.Collector&&"undefined"!=typeof window){var r="__vestrategy_".concat(e.type,"_tracker__");if(!window[r]){this.tracker=window[r]=new e.trackInfo.Collector("".concat(e.type,"_tracker")),this.tracker.init({app_id:e.appId,channel:e.channel||l1.CN,log:!1,disable_sdk_monitor:!0});var i=oJ({play_type:e.type===l0.VOD?0:1,line_app_id:e.lineAppId,line_user_id:e.lineUserId},function(e){if(!e||"[object Object]"!==Object.prototype.toString.call(e))return{};var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))t[n.replace(/[A-Z]/g,function(e){return"_".concat(e.toLowerCase())})]=e[n];return t}(this.ctx.featureCenter.getFeatureList()));return this.tracker.config(oJ(oJ({},i),{},{user_unique_id:e.lineUserId,disable_auto_pv:!0})),void this.tracker.start()}this.tracker=window[r]}}},{key:"bindABVersion",value:function(){var e,t,n=this;this.tracker&&(null===(e=this.tracker)||void 0===e||null===(t=e.filterEvent)||void 0===t||t.call(e,function(e){var t,r;return null==e||null===(t=e[0])||void 0===t||null===(t=t.events)||void 0===t||null===(r=uC(t))||void 0===r||r.call(t,function(e){var t,r=((null===(t=n.ctx)||void 0===t||null===(t=t.dataCenter)||void 0===t?void 0:t.getServiceStrategyConfig())||{}).libra_ab_version;r&&e&&(e.ab_sdk_version="".concat(r))}),e}))}}]),po=new l9("VeStrategy-BasePlugin"),pa=function(){function e(t){uE(this,e),oX((n=this,r=e,i=[t],r=lV(r),c=lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))),"ctx",void 0),oX(c,"strategyCenter",void 0),oX(c,"videoType",void 0),oX(c,"playerLogEventHandler",function(e,t){var n,r;return"string"==typeof e?null===(n=c.ctx)||void 0===n||null===(n=n.tracker)||void 0===n||null===(r=n.track)||void 0===r?void 0:r.call(n,e,t):ux(e)?uC(e).call(e,function(e){var t,n,r=e.eventName,i=e.params;null===(t=c.ctx)||void 0===t||null===(t=t.tracker)||void 0===t||null===(n=t.track)||void 0===n||n.call(t,r,i)}):void 0});var n,r,i,o,a,s,u,c,l=c.config;c.ctx=l.ctx,c.videoType=l.videoType,c.strategyCenter=l.strategyCenter,po.update(null===(o=c.ctx)||void 0===o||null===(o=o.dataCenter)||void 0===o||null===(o=o.getAppConfig())||void 0===o?void 0:o.log);var f={playerId:c.player.playerId,playerConfig:null,strategyConfig:null,strategyCenter:c.strategyCenter};return f_(f,"playerConfig",{get:function(){return c.player.config}}),f_(f,"strategyConfig",{get:function(){return l.strategyConfig}}),c.player.playerId&&c.ctx.playerManager.addPlayer(c.player.playerId,{inst:f}),null===(a=c.strategyCenter)||void 0===a||null===(s=a.getStrategyList)||void 0===s||uC(u=s.call(a)).call(u,function(e){var t,n;null==e||null===(t=e.setPlayerInst)||void 0===t||t.call(e,c.ctx.playerManager.get(c.player.playerId)),null==e||null===(n=e.onBasePluginCreated)||void 0===n||n.call(e,c.ctx.playerManager.get(c.player.playerId))}),po.info("BasePluginInit",t.config),c}return lK(e,lq),uz(e,[{key:"afterPlayerInit",value:function(){var e,t,n;this.player.on("abLog",this.playerLogEventHandler),this.videoType===l0.VOD&&(null===(e=this.ctx)||void 0===e||null===(e=e.tracker)||void 0===e||null===(t=e.bindTrackerABVersion)||void 0===t||t.call(e,null===(n=this.player)||void 0===n||null===(n=n.vodLogger)||void 0===n?void 0:n.tracker)),this.videoType,l0.LIVE}},{key:"patchEvent",value:function(e,t){var n,r,i,o,a=this;null===(n=this.strategyCenter)||void 0===n||null===(r=n.getStrategyList)||void 0===r||uC(i=r.call(n)).call(i,function(n){var r;null==n||null===(r=n.onPlayerEvent)||void 0===r||r.call(n,e,{inst:n,options:t})}),null===(o=this.ctx.playerManager.getPlayerList())||void 0===o||uC(o).call(o,function(n){var r,i,o;(null==n||null===(r=n.getInst)||void 0===r||null===(r=r.call(n))||void 0===r?void 0:r.playerId)!==a.player.playerId&&(null==n||null===(i=n.getInst)||void 0===i||null===(i=i.call(n))||void 0===i||null===(i=i.strategyCenter)||void 0===i||null===(o=i.getStrategyList)||void 0===o||null===(o=o.call(i))||void 0===o||uC(o).call(o,function(r){var i;null==r||null===(i=r.onGlobalEvent)||void 0===i||i.call(r,e,{inst:n,options:t})}))})}},{key:"afterCreate",value:function(){var e=this;this.player.on(lY.Play,function(t){e.patchEvent(lY.Play,t),po.info("Event",lY.Play)})}},{key:"destroy",value:function(){this.ctx.playerManager.removePlayer(this.player.playerId),this.player.off("abLog",this.playerLogEventHandler)}}],[{key:"pluginName",get:function(){return"veStrategyBasePlugin"}},{key:"defaultConfig",get:function(){return{text:"策略基础插件"}}}])}(),ps=uz(function e(){uE(this,e)},[{key:"apply",value:function(e,t){var n,r,i=this,o=t||{},a=o.plugins,s=o.pluginConfiguration,u=o.result;return e?(null!=a&&a.length&&ux(e.presets)?e.presets.unshift(uz(function e(){uE(this,e),oX(this,"plugins",a)})):null!=a&&a.length&&ux(e.plugins)&&(e.plugins=ll(a).call(a,e.plugins)),null!=a&&a.length&&s&&uC(r=uI(s)).call(r,function(t){e[t]=s[t]}),u&&uC(n=uI(u)).call(n,function(t){t===l5.adaptRange&&i.adaptRange(e,u[t])}),e):e}},{key:"_findConfig",value:function(e,t){var n;return hY(n=uI(e)).call(n,function(e){return(null==e?void 0:e.toLowerCase())===t})}},{key:"adaptRange",value:function(e,t){if(null==t||!t.enable||!e||null==t||!t._vtype||!fl(n=[l2.MP4,l2.DASH]).call(n,t._vtype))return e;var n,r,i=this._findConfig(e,t._vtype===l2.MP4?"mp4encryptplayer":"dashplugin");return i&&e[i]&&t.options&&(e[i].adaptRange=oJ(oJ({},null!==(r=e[i].adaptRange)&&void 0!==r?r:{}),t.options)),e}}]),pu=function(){function e(){var t,n,r;return uE(this,e),t=this,n=e,r=arguments,n=lV(n),lP(t,lG()?lW(n,r||[],lV(t).constructor):n.apply(t,r))}return lK(e,ps),uz(e,[{key:"apply",value:function(e,t){var n,r,i=t||{},o=i.plugins,a=i.pluginConfiguration,s=i.result;if(!e)return e;if(this.normalizeConfig(e),null!=o&&o.length&&ux(null===(n=e.preset)||void 0===n?void 0:n.plugins)){var u=e.preset.plugins;uC(o).call(o,function(e){-1===h6(u).call(u,e)&&u.push(e)})}if(a){var c,l=e.preset.pluginsConfig;uC(c=uI(a)).call(c,function(e){l[e]=a[e]})}return s&&(uC(r=uI(s)).call(r,function(e){s[e]&&!1===s[e].transferToPluginConfig&&delete s[e]}),uM(e.baseConfig,s)),e}},{key:"normalizeConfig",value:function(e){e.preset||(e.preset={}),ux(e.preset.plugins)||(e.preset.plugins=[]),"object"!==ot(e.preset.pluginsConfig)&&(e.preset.pluginsConfig={})}}])}(),pc=new l9("DyStrategy"),pl=oX({},l0.VOD,pu),pf=function(){var e,t,n,r,i;function o(e){uE(this,o),oX(this,"ctx",void 0),oX(this,"configPreparePromise",void 0),oX(this,"isStrategyStarted",!1);var t=new dm(e),n=new fm(e,null);pc.update(e.log),this.ctx={dataCenter:n,featureCenter:t,playerManager:new pn,tracker:new pi({trackInfo:e.tracker,type:e.type||l0.VOD,lineAppId:e.appId,lineUserId:e.deviceId,appId:(e.type,l0.VOD,void 0),channel:e.region,cxt:{dataCenter:n,featureCenter:t}})},this.prepare(!0)}return uz(o,[{key:"start",value:(i=uk(uw().mark(function e(){var t,n,r=this;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isStrategyStarted){e.next=1;break}return e.abrupt("return");case 1:if(this.isStrategyStarted=!0,pc.info("Start"),this.ctx.tracker.track("strategy_start",{}),this.ctx.featureCenter.getFeatureList().deviceId){e.next=4;break}return e.next=2,this.getTeaToken();case 2:if(n=e.sent){e.next=3;break}n={};case 3:t=n,this.ctx.featureCenter.updateFeatureList({deviceId:t.user_unique_id||t.web_id||""});case 4:return this.configPreparePromise=this.ctx.dataCenter.fetchStrategyConfig(),this.configPreparePromise.then(function(){return r.prepare(!1)}),e.abrupt("return",this.configPreparePromise);case 5:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"updateFeatures",value:(r=uk(uw().mark(function e(t){var n,r,i;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&null!==(n=this.ctx)&&void 0!==n&&null!==(n=n.featureCenter)&&void 0!==n&&n.updateFeatureList){e.next=1;break}return e.abrupt("return");case 1:if(i=null===(r=this.ctx.featureCenter.getFeatureList())||void 0===r?void 0:r.deviceId,this.ctx.featureCenter.updateFeatureList(oJ({},t)),!t.deviceId||t.deviceId===i){e.next=2;break}return e.abrupt("return",this.reloadConfig());case 2:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"reloadConfig",value:(n=uk(uw().mark(function e(){return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.configPreparePromise=this.ctx.dataCenter.fetchStrategyConfig(),e.abrupt("return",this.configPreparePromise);case 1:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"getTeaToken",value:(t=uk(uw().mark(function e(){var t=this;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new uA(function(e){if("function"==typeof(null===(n=t.ctx.tracker)||void 0===n||null===(n=n.tracker)||void 0===n?void 0:n.getToken))return t.ctx.tracker.tracker.getToken(function(t){return e(t)});var n,r,i,o=((null===(r=t.ctx.tracker)||void 0===r||null===(r=r.tracker)||void 0===r||null===(i=r.getConfig)||void 0===i?void 0:i.call(r))||{}).user;return e(void 0===o?{}:o)}));case 1:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)})},{key:"prepare",value:function(e){var t,n=this,r=this.ctx.dataCenter.getInitStrategyConfig()||{},i=this.ctx.dataCenter.getServiceStrategyConfig()||{};uC(t=uI(r)).call(t,function(t){var o,a,s,u,c,l,f;(null===(o=r[t])||void 0===o?void 0:o.disabled)||(null==i||null===(a=i[t])||void 0===a?void 0:a.disabled)||null===(s=r[t])||void 0===s||null===(s=s.Strategy)||void 0===s||null===(u=s[e?"prepareBeforeStarted":"prepareAfterStarted"])||void 0===u||u.call(s,{ctx:n.ctx,Strategy:null===(c=r[t])||void 0===c?void 0:c.Strategy,config:oJ(oJ({},null===(l=r[t])||void 0===l?void 0:l.config),null==i||null===(f=i[t])||void 0===f?void 0:f.config)})})}}],[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(pc.update(null==e?void 0:e.log),(null!=e&&e.appId||t)&&e.strategies){var n={};if(ux(e.strategies))uC(r=e.strategies).call(r,function(e){n[e.Strategy.strategyName]=e});else{var r,i,a=e.strategies;uC(i=uI(a)).call(i,function(e){null!=a&&a[e]&&"object"===ot(null==a?void 0:a[e])&&(n[e]=a[e])})}var s=oJ(oJ({},e),{},{strategies:n,type:e.type||l0.VOD});if(pc.info("Init",s),s.type===l0.VOD||s.type===l0.LIVE){if(s.type===l0.VOD){if(o._vodInst=o._vodInst||new o(s),t){var u=uM({},o._vodInst.ctx.dataCenter.getAppConfig(),s);o._vodInst.ctx.dataCenter.setServiceStrategyConfig(u.strategies)}else o._vodInst.ctx.tracker.track("strategy_init",{});return o._vodInst}return o._liveInst=o._liveInst||new o(s),o._liveInst.ctx.tracker.track("strategy_init",{}),o._liveInst}pc.error("Init Invalid Strategy Type=".concat(e.type))}else pc.error("Init without appId or strategies",e)}},{key:"bootstrap",value:function(e){var t;return null===(t=o.init(e))||void 0===t?void 0:t.start()}},{key:"applyServerConfig",value:function(e){pc.info("reboot",e),e.strategies&&o.init(e,!0)}},{key:"inst",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l0.VOD;return e===l0.VOD?o._vodInst:e===l0.LIVE?o._liveInst:null}},{key:"recLive",value:function(e,t){return o.rec(e,t,l0.LIVE)}},{key:"recAsync",value:(e=uk(uw().mark(function e(t,n){var r,i,a=arguments;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>2&&void 0!==a[2]?a[2]:l0.VOD,i=o.inst(r||l0.VOD),pc.info("recAsync",i,n,r),null!=i&&i.configPreparePromise){e.next=1;break}return pc.error("VeStrategyNotInitOrStart"),e.abrupt("return",{plugins:[],pluginConfiguration:{},result:{}});case 1:return e.next=2,i.configPreparePromise;case 2:return e.abrupt("return",o.rec(t,n,r));case 3:case"end":return e.stop()}},e)})),function(t,n){return e.apply(this,arguments)})},{key:"hybrid",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l0.VOD,r=o.rec(e,t,n);return o.apply(t,r)}},{key:"rec",value:function(e,t){var n,r,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l0.VOD,s={plugins:[],pluginConfiguration:{},result:{}},u={recResult:!t.baseConfig,vtype:(null===(n=t.baseConfig)||void 0===n?void 0:n.protocol)||l2.MP4,bitrate:(null===(r=t.baseConfig)||void 0===r||null===(r=r.mediaInfo)||void 0===r?void 0:r.bitrate)||0,duration:(null===(i=t.baseConfig)||void 0===i||null===(i=i.mediaInfo)||void 0===i?void 0:i.duration)||0};try{s=o._rec(e,u,a)}catch(t){pc.error("VeStrategyRecError");var c,l=o.inst(a);null==l||null===(c=l.ctx)||void 0===c||null===(c=c.tracker)||void 0===c||c.track("strategy_js_error",{type:a,option:u5(null!=e?e:{}),common_config:u5(null!=u?u:{})})}return s}},{key:"reportABInfo",value:function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l0.VOD;l0.VOD!==r?l0.LIVE!==r||null===(t=o._liveInst)||void 0===t||null===(t=t.ctx)||void 0===t||null===(t=t.tracker)||void 0===t||t.bindTrackerABVersion(e):null===(n=o._vodInst)||void 0===n||null===(n=n.ctx)||void 0===n||null===(n=n.tracker)||void 0===n||n.bindTrackerABVersion(e)}},{key:"getServiceConfig",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l0.VOD;return l0.VOD===n?(null===(e=o._vodInst)||void 0===e||null===(e=e.ctx)||void 0===e||null===(e=e.dataCenter)||void 0===e?void 0:e.getServiceStrategyConfig())||{}:l0.LIVE===n&&(null===(t=o._liveInst)||void 0===t||null===(t=t.ctx)||void 0===t||null===(t=t.dataCenter)||void 0===t?void 0:t.getServiceStrategyConfig())||{}}},{key:"apply",value:function(e,t,n){var r;if(!e||!t)return e;if(((null==n?void 0:n.type)||l0.VOD)===l0.VOD&&null!==(r=o._vodInst)&&void 0!==r&&r.ctx){var i,a=(null==n?void 0:n.Adapter)||(null===(i=o._vodInst.ctx.dataCenter.getAppConfig())||void 0===i||null===(i=i.adapter)||void 0===i?void 0:i.Adapter)||pl[l0.VOD];a&&(e=(new a).apply(e,t))}return e}},{key:"_rec",value:function(e,t){var n,r,i,a,s,u,c,l,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l0.VOD,h=o.inst(f||l0.VOD);if(pc.info("rec",h,t,f),!h)return pc.error("VeStrategyNotInit"),{plugins:[],pluginConfiguration:{},result:{}};var d={plugins:[pa],pluginConfiguration:oX({},pa.pluginName,{}),result:{},strategyPluginKeys:pa.pluginName},p=new pr(h.ctx),v=h.ctx.dataCenter.getServiceStrategyConfig()||{},g=h.ctx.dataCenter.getInitStrategyConfig()||{},y=i9(new ls(ll(n=uI(g)).call(n,uI(v))));uC(y).call(y,function(t){var n,r=g[t],i=v[t],o=null==e?void 0:e[t];if(null!=r&&r.disabled||null!=i&&i.disabled||null!=o&&o.disabled)pc.warn("StrategyDisabled",r,i,o);else{r.Strategy=(null==r?void 0:r.Strategy)||i.Strategy;var a,s,u=oJ(oJ(oJ({},r),o),{},{config:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rn,a=R(r)?r:pg(r),s=o?np(arguments,n):[],u=o?function(){w(a,this,s)}:a;return t?e(u,i):e(u)}:e},p_=pm(v.setInterval,!0);ta({global:!0,bind:!0,forced:v.setInterval!==p_},{setInterval:p_});var pb=pm(v.setTimeout,!0);ta({global:!0,bind:!0,forced:v.setTimeout!==pb},{setTimeout:pb});var pw=Q.setTimeout,pS=d(pw),pk=d(i7),pE=i5("Array","keys"),pT=Array.prototype,pz={DOMTokenList:!0,NodeList:!0},pA=d(function(e){var t=e.keys;return e===pT||ee(pT,e)&&t===pT.keys||eI(pz,tC(e))?pE:t}),pC=RangeError,pI=String.fromCharCode,px=String.fromCodePoint,pR=T([].join);ta({target:"String",stat:!0,arity:1,forced:!!px&&1!==px.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;r>i;){if(t=+arguments[i++],t$(t,1114111)!==t)throw new pC(t+" is not a valid code point");n[i]=t<65536?pI(t):pI(55296+((t-=65536)>>10),t%1024+56320)}return pR(n,"")}});var pD=eB("iterator"),pP=!g(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,n=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",t.forEach(function(e,n){t.delete("b"),r+=n+e}),n.delete("a",2),n.delete("b",void 0),!e.toJSON||!n.has("a",1)||n.has("a",2)||!n.has("a",void 0)||n.has("b")||!t.size||!t.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[pD]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",void 0).host}),pO=eB("iterator"),pL="URLSearchParams",pM=pL+"Iterator",pB=nU.set,pN=nU.getterFor(pL),pU=nU.getterFor(pM),pj=si("fetch"),pF=si("Request"),pG=si("Headers"),pV=pF&&pF.prototype,pH=pG&&pG.prototype,pK=v.TypeError,pW=v.encodeURIComponent,pq=String.fromCharCode,pY=$("String","fromCodePoint"),pZ=parseInt,pX=T("".charAt),pQ=T([].join),pJ=T([].push),p$=T("".replace),p0=T([].shift),p1=T([].splice),p2=T("".split),p5=T("".slice),p4=T(/./.exec),p3=/\+/g,p6=/^[0-9a-f]+$/i,p8=function(e,t){var n=p5(e,t,t+2);return p4(p6,n)?pZ(n,16):NaN},p9=function(e){for(var t=0,n=128;n>0&&0!=(e&n);n>>=1)t++;return t},p7=function(e){var t=null;switch(e.length){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return t>1114111?null:t},ve=function(e){for(var t=(e=p$(e,p3," ")).length,n="",r=0;rt){n+="%",r++;continue}var o=p8(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var a=p9(o);if(0===a)i=pq(o);else{if(1===a||a>4){n+="�",r++;continue}for(var s=[o],u=1;ut||"%"!==pX(e,r));){var c=p8(e,r+1);if(c!=c){r+=3;break}if(c>191||c<128)break;pJ(s,c),r+=2,u++}if(s.length!==a){n+="�";continue}var l=p7(s);null===l?n+="�":i=pY(l)}}n+=i,r++}return n},vt=/[!'()~]|%20/g,vn={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},vr=function(e){return vn[e]},vi=function(e){return p$(pW(e),vt,vr)},vo=rZ(function(e,t){pB(this,{type:pM,target:pN(e).entries,index:0,kind:t})},pL,function(){var e=pU(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,r7(void 0,!0);var r=t[n];switch(e.kind){case"keys":return r7(r.key,!1);case"values":return r7(r.value,!1)}return r7([r.key,r.value],!1)},!0),va=function(e){this.entries=[],this.url=null,void 0!==e&&(X(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===pX(e,0)?p5(e,1):e:tZ(e)))};va.prototype={type:pL,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s,u=this.entries,c=iL(e);if(c)for(n=(t=iG(e,c)).next;!(r=L(n,t)).done;){if((a=L(o=(i=iG(e6(r.value))).next,i)).done||(s=L(o,i)).done||!L(o,i).done)throw new pK("Expected sequence with length 2");pJ(u,{key:tZ(a.value),value:tZ(s.value)})}else for(var l in e)eI(e,l)&&pJ(u,{key:l,value:tZ(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=this.entries,i=p2(e,"&"),o=0;o0?arguments[0]:void 0));P||(this.size=e.entries.length)},vu=vs.prototype;if(cf(vu,{append:function(e,t){var n=pN(this);aX(arguments.length,2),pJ(n.entries,{key:tZ(e),value:tZ(t)}),P||this.length++,n.updateURL()},delete:function(e){for(var t=pN(this),n=aX(arguments.length,1),r=t.entries,i=tZ(e),o=n<2?void 0:arguments[1],a=void 0===o?o:tZ(o),s=0;st.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=pN(this).entries,r=e1(e,arguments.length>1?arguments[1]:void 0),i=0;i1?vf(arguments[1]):{})}}),R(pF)){var vh=function(e){return aH(this,pV),new pF(e,arguments.length>1?vf(arguments[1]):{})};pV.constructor=vh,vh.prototype=pV,ta({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vh})}}var vd,vp,vv,vg,vy,vm,v_,vb,vw,vS,vk,vE,vT,vz,vA,vC,vI,vx,vR,vD,vP=/[^\0-\u007E]/,vO=/[.\u3002\uFF0E\uFF61]/g,vL="Overflow: input needs wider integers to process",vM=35,vB=RangeError,vN=T(vO.exec),vU=Math.floor,vj=String.fromCharCode,vF=T("".charCodeAt),vG=T([].join),vV=T([].push),vH=T("".replace),vK=T("".split),vW=T("".toLowerCase),vq=function(e){for(var t=[],n=0,r=e.length;n=55296&&i<=56319&&n>1,e+=vU(e/t);e>26*vM>>1;)e=vU(e/vM),r+=36;return vU(r+(vM+1)*e/(e+38))},vX=function(e){var t,n,r=[],i=(e=vq(e)).length,o=128,a=0,s=72;for(t=0;t=o&&nvU((2147483647-a)/f))throw new vB(vL);for(a+=(l-o)*f,o=l,t=0;t2147483647)throw new vB(vL);if(n===o){for(var h=a,d=36;;){var p=d<=s?1:d>=s+26?26:d-s;if(h?@[\\\]^|]/,gw=/[\0\t\n\r #/:<>?@[\\\]^|]/,gS=/^[\u0000-\u0020]+/,gk=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,gE=/[\t\n\r]/g,gT=function(e){var t,n,r,i,o,a,s,u=ga(e,".");if(u.length&&""===u[u.length-1]&&u.length--,(t=u.length)>4)return e;for(n=[],r=0;r1&&"0"===v9(i,0)&&(o=v7(gg,i)?16:8,i=gs(i,8===o?1:2)),""===i)a=0;else{if(!v7(10===o?gm:8===o?gy:g_,i))return e;a=v3(i,o)}gr(n,a)}for(r=0;r=v8(256,5-t))return null}else if(a>255)return null;for(s=gn(n),r=0;r6))return;for(r=0;h();){if(i=null,r>0){if(!("."===h()&&r<4))return;f++}if(!v7(gv,h()))return;for(;v7(gv,h());){if(o=v3(h(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!==r||c++}if(4!==r)return;break}if(":"===h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!==c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!==c)return;return u},gA=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n?r:t},gC=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)gc(t,e%256),e=v6(e/256);return ge(t,".")}if("object"==typeof e){for(t="",r=gA(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=gt(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},gI={},gx=uO({},gI,{" ":1,'"':1,"<":1,">":1,"`":1}),gR=uO({},gx,{"#":1,"?":1,"{":1,"}":1}),gD=uO({},gR,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gP=function(e,t){var n=vQ(e,0);return n>32&&n<127&&!eI(t,e)?e:encodeURIComponent(e)},gO={ftp:21,file:null,http:80,https:443,ws:80,wss:443},gL=function(e,t){var n;return 2===e.length&&v7(gd,v9(e,0))&&(":"===(n=v9(e,1))||!t&&"|"===n)},gM=function(e){var t;return e.length>1&&gL(gs(e,0,2))&&(2===e.length||"/"===(t=v9(e,2))||"\\"===t||"?"===t||"#"===t)},gB={},gN={},gU={},gj={},gF={},gG={},gV={},gH={},gK={},gW={},gq={},gY={},gZ={},gX={},gQ={},gJ={},g$={},g0={},g1={},g2={},g5={},g4=function(e,t,n){var r,i,o,a=tZ(e);if(t){if(i=this.parse(a))throw new v4(i);this.searchParams=null}else{if(void 0!==n&&(r=new g4(n,!0)),i=this.parse(a,null,r))throw new v4(i);(o=v0(new v$)).bindURL(this),this.searchParams=o}};g4.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=t||gB,u=0,c="",l=!1,f=!1,h=!1;for(e=tZ(e),t||(this.scheme="",this.username="",this.password="",this.host=null,this.port=null,this.path=[],this.query=null,this.fragment=null,this.cannotBeABaseURL=!1,e=gi(e,gS,""),e=gi(e,gk,"$1")),r=iK(e=gi(e,gE,""));u<=r.length;){switch(i=r[u],s){case gB:if(!i||!v7(gd,i)){if(t)return gl;s=gU;continue}c+=gu(i),s=gN;break;case gN:if(i&&(v7(gp,i)||"+"===i||"-"===i||"."===i))c+=gu(i);else{if(":"!==i){if(t)return gl;c="",s=gU,u=0;continue}if(t&&(this.isSpecial()!==eI(gO,c)||"file"===c&&(this.includesCredentials()||null!==this.port)||"file"===this.scheme&&!this.host))return;if(this.scheme=c,t)return void(this.isSpecial()&&gO[this.scheme]===this.port&&(this.port=null));c="","file"===this.scheme?s=gX:this.isSpecial()&&n&&n.scheme===this.scheme?s=gj:this.isSpecial()?s=gH:"/"===r[u+1]?(s=gF,u++):(this.cannotBeABaseURL=!0,gr(this.path,""),s=g1)}break;case gU:if(!n||n.cannotBeABaseURL&&"#"!==i)return gl;if(n.cannotBeABaseURL&&"#"===i){this.scheme=n.scheme,this.path=np(n.path),this.query=n.query,this.fragment="",this.cannotBeABaseURL=!0,s=g5;break}s="file"===n.scheme?gX:gG;continue;case gj:if("/"!==i||"/"!==r[u+1]){s=gG;continue}s=gK,u++;break;case gF:if("/"===i){s=gW;break}s=g0;continue;case gG:if(this.scheme=n.scheme,i===vD)this.username=n.username,this.password=n.password,this.host=n.host,this.port=n.port,this.path=np(n.path),this.query=n.query;else if("/"===i||"\\"===i&&this.isSpecial())s=gV;else if("?"===i)this.username=n.username,this.password=n.password,this.host=n.host,this.port=n.port,this.path=np(n.path),this.query="",s=g2;else{if("#"!==i){this.username=n.username,this.password=n.password,this.host=n.host,this.port=n.port,this.path=np(n.path),this.path.length--,s=g0;continue}this.username=n.username,this.password=n.password,this.host=n.host,this.port=n.port,this.path=np(n.path),this.query=n.query,this.fragment="",s=g5}break;case gV:if(this.isSpecial()&&("/"===i||"\\"===i))s=gK;else{if("/"!==i){this.username=n.username,this.password=n.password,this.host=n.host,this.port=n.port,s=g0;continue}s=gW}break;case gH:if(s=gK,"/"!==i||"/"!==v9(c,u+1))continue;u++;break;case gK:if("/"!==i&&"\\"!==i){s=gW;continue}break;case gW:if("@"===i){l&&(c="%40"+c),l=!0,o=iK(c);for(var d,p,v=0;v65535)return gh;this.port=this.isSpecial()&&m===gO[this.scheme]?null:m,c=""}if(t)return;s=g$;continue}return gh}c+=i;break;case gX:if(this.scheme="file","/"===i||"\\"===i)s=gQ;else{if(!n||"file"!==n.scheme){s=g0;continue}switch(i){case vD:this.host=n.host,this.path=np(n.path),this.query=n.query;break;case"?":this.host=n.host,this.path=np(n.path),this.query="",s=g2;break;case"#":this.host=n.host,this.path=np(n.path),this.query=n.query,this.fragment="",s=g5;break;default:gM(ge(np(r,u),""))||(this.host=n.host,this.path=np(n.path),this.shortenPath()),s=g0;continue}}break;case gQ:if("/"===i||"\\"===i){s=gJ;break}n&&"file"===n.scheme&&!gM(ge(np(r,u),""))&&(gL(n.path[0],!0)?gr(this.path,n.path[0]):this.host=n.host),s=g0;continue;case gJ:if(i===vD||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&gL(c))s=g0;else if(""===c){if(this.host="",t)return;s=g$}else{if(a=this.parseHost(c))return a;if("localhost"===this.host&&(this.host=""),t)return;c="",s=g$}continue}c+=i;break;case g$:if(this.isSpecial()){if(s=g0,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i){if(t||"#"!==i){if(i!==vD&&(s=g0,"/"!==i))continue}else this.fragment="",s=g5}else this.query="",s=g2;break;case g0:if(i===vD||"/"===i||"\\"===i&&this.isSpecial()||!t&&("?"===i||"#"===i)){;if(".."===(d=gu(d=c))||"%2e."===d||".%2e"===d||"%2e%2e"===d?(this.shortenPath(),"/"===i||"\\"===i&&this.isSpecial()||gr(this.path,"")):"."===(p=c)||"%2e"===gu(p)?"/"===i||"\\"===i&&this.isSpecial()||gr(this.path,""):("file"===this.scheme&&!this.path.length&&gL(c)&&(this.host&&(this.host=""),c=v9(c,0)+":"),gr(this.path,c)),c="","file"===this.scheme&&(i===vD||"?"===i||"#"===i))for(;this.path.length>1&&""===this.path[0];)go(this.path);"?"===i?(this.query="",s=g2):"#"===i&&(this.fragment="",s=g5)}else c+=gP(i,gR);break;case g1:"?"===i?(this.query="",s=g2):"#"===i?(this.fragment="",s=g5):i!==vD&&(this.path[0]+=gP(i,gI));break;case g2:t||"#"!==i?i!==vD&&("'"===i&&this.isSpecial()?this.query+="%27":this.query+="#"===i?"%23":gP(i,gI)):(this.fragment="",s=g5);break;case g5:i!==vD&&(this.fragment+=gP(i,gx))}u++}},parseHost:function(e){var t,n,r;if("["===v9(e,0)){if("]"!==v9(e,e.length-1)||!(t=gz(gs(e,1,-1))))return gf;this.host=t}else if(this.isSpecial()){if(v7(gb,e=vJ(e))||null===(t=gT(e)))return gf;this.host=t}else{if(v7(gw,e))return gf;for(t="",n=iK(e),r=0;r1?arguments[1]:void 0,r=v1(t,new g4(e,!1,n));P||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},g6=g3.prototype,g8=function(e,t){return{get:function(){return v2(this)[e]()},set:t&&function(e){return v2(this)[t](e)},configurable:!0,enumerable:!0}};if(P&&(nb(g6,"href",g8("serialize","setHref")),nb(g6,"origin",g8("getOrigin")),nb(g6,"protocol",g8("getProtocol","setProtocol")),nb(g6,"username",g8("getUsername","setUsername")),nb(g6,"password",g8("getPassword","setPassword")),nb(g6,"host",g8("getHost","setHost")),nb(g6,"hostname",g8("getHostname","setHostname")),nb(g6,"port",g8("getPort","setPort")),nb(g6,"pathname",g8("getPathname","setPathname")),nb(g6,"search",g8("getSearch","setSearch")),nb(g6,"searchParams",g8("getSearchParams")),nb(g6,"hash",g8("getHash","setHash"))),n_(g6,"toJSON",function(){return v2(this).serialize()},{enumerable:!0}),n_(g6,"toString",function(){return v2(this).serialize()},{enumerable:!0}),v5){var g9=v5.createObjectURL,g7=v5.revokeObjectURL;g9&&n_(g3,"createObjectURL",e1(g9,v5)),g7&&n_(g3,"revokeObjectURL",e1(g7,v5))}nR(g3,"URL"),ta({global:!0,constructor:!0,forced:!pP,sham:!P},{URL:g3});var ye=$("URL"),yt=pP&&g(function(){ye.canParse()}),yn=g(function(){return 1!==ye.canParse.length});ta({target:"URL",stat:!0,forced:!yt||yn},{canParse:function(e){var t=aX(arguments.length,1),n=tZ(e),r=t<2||void 0===arguments[1]?void 0:tZ(arguments[1]);try{return new ye(n,r),!0}catch(e){return!1}}});var yr=$("URL");ta({target:"URL",stat:!0,forced:!pP},{parse:function(e){var t=aX(arguments.length,1),n=tZ(e),r=t<2||void 0===arguments[1]?void 0:tZ(arguments[1]);try{return new yr(n,r)}catch(e){return null}}});var yi=Q.URL,yo=d(yi),ya=T(M.f),ys=T([].push),yu=P&&g(function(){var e=Object.create(null);return e[2]=2,!ya(e,2)}),yc=function(e){return function(t){for(var n,r=Z(t),i=t8(r),o=yu&&null===rV(r),a=i.length,s=0,u=[];a>s;)n=i[s++],(!P||(o?n in r:ya(r,n)))&&ys(u,e?[n,r[n]]:r[n]);return u}},yl={entries:yc(!0),values:yc(!1)},yf=yl.entries;ta({target:"Object",stat:!0},{entries:function(e){return yf(e)}});var yh,yd,yp=Q.Object.entries,yv=d(yp),yg=Q.setInterval,yy=d(yg),ym=v.RegExp,y_={correct:!g(function(){var e=!0;try{ym(".","d")}catch(t){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(o.hasIndices="d"),o)i(a,o[a]);return Object.getOwnPropertyDescriptor(ym.prototype,"flags").get.call(t)!==r||n!==r})},yb=function(){var e=e6(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},yw=RegExp.prototype,yS=y_.correct?function(e){return e.flags}:function(e){return y_.correct||!ee(yw,e)||eI(e,"flags")?e.flags:L(yb,e)},yk=RegExp.prototype,yE=d(function(e){return e===yk||ee(yk,e)?yS(e):e.flags}),yT=d(ac),yz=function(){return(yz=uM||function(e){for(var t,n=1,r=arguments.length;nh6(t).call(t,r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof ph){var i=0;for(r=ph(e);ih6(t).call(t,r[i])&&(n[r[i]]=e[r[i]])}return n}function yC(e,t){var n="function"==typeof pd&&pp(e);if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function yI(){for(var e=[],t=0;t0x7fffffffffff||t<-140737488355328)&&(t&=0xffffffffffff);return t<0&&(t+=0x7ffffffffffff),t},yV="undefined"!=typeof window?window:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{};function yH(){throw Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function yK(e,t){return e(t={exports:{}},t.exports),t.exports}var yW,yq,yY=yK(function(e,t){var n;n=function(){function e(){for(var e=0,t={};ee.db.version;if(r&&(e.version,e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function E(e){return a([function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return uA.resolve().then(function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),b(e,!0)}).then(function(){return(function(e){y(e);for(var t=d[e.name],n=t.forages,r=0;r=43)}}).catch(function(){return!1}).then(function(e){return h=e})})(o.db).then(function(e){return e?t:new uA(function(e,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){e({__local_forage_encoded_blob:!0,data:btoa(n.target.result||""),type:t.type})},r.readAsBinaryString(t)})}):t}).then(function(t){A(r._dbInfo,g,function(o,a){if(o)return i(o);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var u=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){try{var e=u.error?u.error:u.transaction.error;i(e)}catch(e){i(e)}}}catch(e){i(e)}})}).catch(i)});return s(i,n),i},removeItem:function(e,t){var n=this;e=c(e);var r=new uA(function(t,r){n.ready().then(function(){A(n._dbInfo,g,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(a.error)},o.onabort=function(){try{var e=a.error?a.error:a.transaction.error;r(e)}catch(e){r(e)}}}catch(e){r(e)}})}).catch(r)});return s(r,t),r},clear:function(e){var t=this,n=new uA(function(e,n){t.ready().then(function(){A(t._dbInfo,g,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){try{var e=o.error?o.error:o.transaction.error;n(e)}catch(e){n(e)}}}catch(e){n(e)}})}).catch(n)});return s(n,e),n},length:function(e){var t=this,n=new uA(function(e,n){t.ready().then(function(){A(t._dbInfo,v,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(e){n(e)}})}).catch(n)});return s(n,e),n},key:function(e,t){var n=this,r=new uA(function(t,r){e<0?t(null):n.ready().then(function(){A(n._dbInfo,v,function(i,o){if(i)return r(i);try{var a=o.objectStore(n._dbInfo.storeName),s=!1,u=(a.openKeyCursor||a.openCursor).call(a);u.onsuccess=function(){var n=u.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},u.onerror=function(){r(u.error)}}catch(e){r(e)}})}).catch(r)});return s(r,t),r},keys:function(e){var t=this,n=new uA(function(e,n){t.ready().then(function(){A(t._dbInfo,v,function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName),a=(o.openKeyCursor||o.openCursor).call(o),s=[];a.onsuccess=function(){var t=a.result;t?(s.push(t.key),t.continue()):e(s)},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return s(n,e),n},dropInstance:function(e,t){t=l.apply(this,arguments);var n,r=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||r.name,e.storeName=e.storeName||r.storeName),e.name){var i=e.name===r.name&&this._dbInfo.db?uA.resolve(this._dbInfo.db):b(e,!1).then(function(t){var n=d[e.name],r=n.forages;n.db=t;for(var i=0;i>4,l[u++]=(15&r)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c}function K(e){var t,n=new Uint8Array(e),r="";for(t=0;t>2]+I[(3&n[t])<<4|n[t+1]>>4]+I[(15&n[t+1])<<2|n[t+2]>>6]+I[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var W={serialize:function(e,t){var n="";if(e&&(n=V.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===V.call(e.buffer))){var r,i=R;e instanceof ArrayBuffer?(r=e,i+=D):(r=e.buffer,"[object Int8Array]"===n?i+=O:"[object Uint8Array]"===n?i+=L:"[object Uint8ClampedArray]"===n?i+=M:"[object Int16Array]"===n?i+=B:"[object Uint16Array]"===n?i+=U:"[object Int32Array]"===n?i+=N:"[object Uint32Array]"===n?i+=j:"[object Float32Array]"===n?i+=F:"[object Float64Array]"===n?i+=G:t(Error("Failed to get type for BinaryArray"))),t(i+K(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){t(R+P+("~~local_forage_type~"+e.type+"~"+K(this.result)))},o.readAsArrayBuffer(e)}else try{t(u5(e))}catch(e){t(null,e)}},deserialize:function(e){if(e.substring(0,9)!==R)return JSON.parse(e);var t,n=e.substring(13),r=e.substring(9,13);if(r===P&&x.test(n)){var i=n.match(x);t=i[1],n=n.substring(i[0].length)}var o=H(n);switch(r){case D:return o;case P:return a([o],{type:t});case O:return new Int8Array(o);case L:return new Uint8Array(o);case M:return new Uint8ClampedArray(o);case B:return new Int16Array(o);case U:return new Uint16Array(o);case N:return new Int32Array(o);case j:return new Uint32Array(o);case F:return new Float32Array(o);case G:return new Float64Array(o);default:throw Error("Unkown type: "+r)}},stringToBuffer:H,bufferToString:K};function q(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function Y(e,t,n,r,i,o){e.executeSql(n,r,i,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?o(e,a):q(e,t,function(){e.executeSql(n,r,i,o)},o)},o):o(e,a)},o)}var Z={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new uA(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction(function(i){q(i,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=W,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new uA(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Y(n,i,"SELECT * FROM "+i.storeName,[],function(n,r){for(var o=r.rows,a=o.length,s=0;s0)return void a(e.apply(o,[t,u,r,i-1]));s(n)}})})}).catch(s)});return s(a,r),a}).apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=c(e);var r=new uA(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Y(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return s(r,t),r},clear:function(e){var t=this,n=new uA(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Y(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return s(n,e),n},length:function(e){var t=this,n=new uA(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Y(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){e(n.rows.item(0).c)},function(e,t){n(t)})})}).catch(n)});return s(n,e),n},key:function(e,t){var n=this,r=new uA(function(t,r){n.ready().then(function(){var i=n._dbInfo;i.db.transaction(function(n){Y(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){t(n.rows.length?n.rows.item(0).key:null)},function(e,t){r(t)})})}).catch(r)});return s(r,t),r},keys:function(e){var t=this,n=new uA(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){Y(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],i=0;i '__WebKitDatabaseInfoTable__'",[],function(t,n){for(var i=[],o=0;o0?(this._dbInfo=t,t.serializer=W,uA.resolve()):uA.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,a=1,s=0;s=0;n--){var r=localStorage.key(n);0===h6(r).call(r,e)&&localStorage.removeItem(r)}});return s(n,e),n},length:function(e){var t=pA(this).call(this).then(function(e){return e.length});return s(t,e),t},key:function(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return s(r,t),r},keys:function(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i=0;t--){var n=localStorage.key(t);0===h6(n).call(n,e)&&localStorage.removeItem(n)}}):uA.reject("Invalid arguments"),t),r}},J=function(e,t){for(var n,r=e.length,i=0;i-1&&(n=pv(e).call(e,0,h6(e).call(e,"Build/")))});else if("ios"===e||"mac"===e||"windows"===e){if(this.isNewIpad())n="iPad";else{var r=navigator.userAgent.replace("Mozilla/5.0 (",""),i=h6(r).call(r,";");n=-1===i?"":pv(r).call(r,0,i)}}}catch(e){}return hg(n).call(n)},e.prototype.isNewIpad=function(){return void 0!==this.userAgent&&"MacIntel"===navigator.platform&&"number"==typeof navigator.maxTouchPoints&&navigator.maxTouchPoints>1},e}(),y0=function(e,t){try{return e?yY.get(e):yY.get()}catch(e){return""}},y1=function(e,t,n,r){try{var i=r||document.domain,o=+new Date+(n||6048e5);yY.set(e,t,{expires:new Date(o),path:"/",domain:i})}catch(e){}},y2=function(){function e(){this.cache={}}return e.prototype.setItem=function(e,t){this.cache[e]=t},e.prototype.getItem=function(e){return this.cache[e]},e.prototype.removeItem=function(e){this.cache[e]=void 0},e.prototype.getCookie=function(e,t){return y0(e)},e.prototype.setCookie=function(e,t,n,r){y1(e,t,n,r)},e}(),y5={getItem:function(e){try{var t=localStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:u5(t);localStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){return y0(e)},setCookie:function(e,t,n,r){y1(e,t,n,r)},isSupportLS:function(){try{return localStorage.setItem("_ranger-test-key","hi"),localStorage.getItem("_ranger-test-key"),localStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},y4={getItem:function(e){try{var t=sessionStorage.getItem(e),n=t;try{t&&"string"==typeof t&&(n=JSON.parse(t))}catch(e){}return n||{}}catch(e){}return{}},setItem:function(e,t){try{var n="string"==typeof t?t:u5(t);sessionStorage.setItem(e,n)}catch(e){}},removeItem:function(e){try{sessionStorage.removeItem(e)}catch(e){}},getCookie:function(e,t){return y0(e)},setCookie:function(e,t,n,r){y1(e,t,n,r)},isSupportSession:function(){try{return sessionStorage.setItem("_ranger-test-key","hi"),sessionStorage.getItem("_ranger-test-key"),sessionStorage.removeItem("_ranger-test-key"),!0}catch(e){return!1}}()},y3=function(){function e(e,t){this._storage=t&&"session"===t?y4:!e&&y5.isSupportLS?y5:new y2}return e.prototype.getItem=function(e){return this._storage.getItem(e)},e.prototype.setItem=function(e,t){this._storage.setItem(e,t)},e.prototype.getCookie=function(e,t){return this._storage.getCookie(e,t)},e.prototype.setCookie=function(e,t,n,r){this._storage.setCookie(e,t,n,r)},e.prototype.removeItem=function(e){this._storage.removeItem(e)},e}(),y6={cn:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k"},y8={cn:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az28z1gz1hz1gz1cz18z1nz1gz4az1az1mz1k",sg:"1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",va:"1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",my:"1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k"},y9="5.3.8",y7=(yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z20z18z1lz1ez1cz20z21z4az1hz21"),yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1az1mz20z1cz4az1hz21"),yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1jz1mz18z1bz1cz20z4az1hz21"),yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1fz1cz18z22z1kz18z1nz49z1az1mz20z1c")),me=(yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz4fz49z1bz18z22z18z4az24z1mz1jz1az1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz1bz18z22z18z49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz22z1cz21z22z1cz20z49z1cz24z1cz1lz22z49z1gz1lz21z1nz1cz1az22z1mz20"),lD(yd=["1fz22z22z1nz21z4mz4bz4bz1bz18z22z18z4az19z27z22z1cz1bz18z1lz1az1cz4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z1cz23z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz22z1cz18z4az22z1gz1iz22z1mz1iz49z23z21z22z21z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz1gz1mz49z21z1ez4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22","1fz22z22z1nz21z4mz4bz4bz1gz1mz49z24z18z4az22z1gz1iz22z1mz1iz49z20z1mz25z4az1lz1cz22"]).call(yd,function(e){return yL(e)})),mt=function(){function e(e,t){this.collector=e,this.config=t,this.eventNameWhiteList=["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","__bav_slide"],this.paramsNameWhiteList=["$inactive","$inline","$target_uuid_list","$source_uuid","$is_spider","$source_id","$is_first_time","_staging_flag"],this.regStr=RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$")}return e.prototype.checkVerify=function(e){var t=this;if(!e||!e.length)return!1;var n=e[0];if(!n)return!1;var r=n.events,i=n.header;if(!r||!r.length)return!1;var o=!0;return uC(r).call(r,function(e){if(!e)return o=!1,void(e.checkEvent="事件异常");t.checkEventName(e.event)||(o=!1,e.checkEvent="事件名不能以 $ or __开头"),t.checkEventParams(e.params)||(o=!1,e.checkParams="属性名不能以 $ or __开头")}),this.checkEventParams(i)||(o=!1),o},e.prototype.checkEventName=function(e){return!!e&&this.calculate(e,"event")},e.prototype.checkEventParams=function(e){var t=e;if("string"==typeof e&&(t=JSON.parse(t)),!uI(t).length)return!0;for(var n in t)return!(!this.calculate(n,"params")||"string"==typeof t[n]&&t[n].length>1024);return!0},e.prototype.calculate=function(e,t){var n;return -1!==h6(n="event"===t?this.eventNameWhiteList:this.paramsNameWhiteList).call(n,e)||!RegExp("^\\$").test(e)&&!RegExp("^__").test(e)},e}();(mz=yW||(yW={})).Init="init",mz.Config="config",mz.Start="start",mz.Ready="ready",mz.UnReady="un-ready",mz.TokenComplete="token-complete",mz.TokenStorage="token-storage",mz.TokenFetch="token-fetch",mz.TokenError="token-error",mz.ConfigUuid="config-uuid",mz.ConfigWebId="config-webid",mz.ConfigDiD="config-device-id",mz.ConfigDomain="config-domain",mz.CustomWebId="custom-webid",mz.TokenChange="token-change",mz.TokenReset="token-reset",mz.ConfigTransform="config-transform",mz.EnvTransform="env-transform",mz.SessionReset="session-reset",mz.SessionResetTime="session-reset-time",mz.SetSessionId="set-session-id",mz.SessionResetInner="session-reset-inner",mz.Event="event",mz.Events="events",mz.EventNow="event-now",mz.CleanEvents="clean-events",mz.BeconEvent="becon-event",mz.SubmitBefore="submit-before",mz.SubmitScuess="submit-scuess",mz.SubmitSuccess="submit-success",mz.SubmitAfter="submit-after",mz.SubmitError="submit-error",mz.SubmitVerify="submit-verify",mz.CustomHeader="custom-request-header",mz.SDKInnerError="sdk-inner-error",mz.SDKRunTimeError="sdk-run-time-error",mz.LogSetting="log-setting",mz.LogSettingReady="log-setting-ready",mz.Stay="stay",mz.ResetStay="reset-stay",mz.StayReady="stay-ready",mz.SetStay="set-stay",mz.RouteChange="route-change",mz.RouteReady="route-ready",mz.Ab="ab",mz.AbVar="ab-var",mz.AbAllVars="ab-all-vars",mz.AbConfig="ab-config",mz.AbExternalVersion="ab-external-version",mz.AbVersionChangeOn="ab-version-change-on",mz.AbVersionChangeOff="ab-version-change-off",mz.AbOpenLayer="ab-open-layer",mz.AbCloseLayer="ab-close-layer",mz.AbReady="ab-ready",mz.AbComplete="ab-complete",mz.AbTimeout="ab-timeout",mz.AbVerify="ab-verify",mz.Profile="profile",mz.ProfileSet="profile-set",mz.ProfileSetOnce="profile-set-once",mz.ProfileUnset="profile-unset",mz.ProfileIncrement="profile-increment",mz.ProfileAppend="profile-append",mz.ProfileClear="profile-clear",mz.Autotrack="autotrack",mz.AutotrackReady="autotrack-ready",mz.CepReady="cep-ready",mz.TracerReady="tracer-ready",mz.sessionRecord="session-record",mz.SessionRecordStart="session-record-start",mz.SessionRecordPause="session-record-pause",mz.SessionRecordEnd="session-record-end",mz.SessionRecordReport="session-record-report",mz.DestoryInstance="destory-instance",mz.VisualCollectReady="visual-collect-ready",mz.VisualApiReady="visual-api-ready",mz.VisualApiUpdate="visual-api-update",mz.TrackDuration="track-duration",mz.TrackDurationStart="track-duration-start",mz.TrackDurationEnd="track-duration-end",mz.TrackDurationPause="track-duration-pause",mz.TrackDurationResume="tracl-duration-resume",mz.MonitorConfig="monitor-config",mz.XhrBeforeSend="xhr-before-send",mz.XhrCurrendSend="xhr-current-send",mz.HttpOk="http-ok",mz.HttpError="http-error",mz.SDKFail="sdk-fail",mz.SDKException="sdk-exception",(mA=yq||(yq={})).DEBUGGER_MESSAGE="debugger-message",mA.DEBUGGER_MESSAGE_SDK="debugger-message-sdk",mA.DEBUGGER_MESSAGE_FETCH="debugger-message-fetch",mA.DEBUGGER_MESSAGE_FETCH_RESULT="debugger-message-fetch-result",mA.DEBUGGER_MESSAGE_EVENT="debugger-message-event",mA.DEVTOOL_WEB_READY="devtool-web-ready";var mn=yW,mr=void 0,mi=(new Date).getTimezoneOffset(),mo=hl(""+-mi/60,10),ma=60*mi,ms=function(){function e(e,t){var n=this;this.is_first_time=!0,this.configPersist=!1,this.enableClientTransport=!1,this.initConfig=t,this.collect=e;var r=new y$(t.app_id,t.cookie_domain||"",t.cookie_expire||7776e6).init();this.eventCheck=new mt(e,t);var i="__tea_cache_first_"+t.app_id;this.configKey="__tea_cache_config_"+t.app_id,this.sessionStorage=new y3(!1,"session"),this.localStorage=new y3(!1,"local"),t.configPersist&&(this.configPersist=!0,this.storage=1===t.configPersist?this.sessionStorage:this.localStorage);var o=this.localStorage.getItem(i);o&&1==o?this.is_first_time=!1:(this.is_first_time=!0,this.localStorage.setItem(i,"1")),this.envInfo={user:{user_unique_id:mr,user_type:mr,user_id:mr,user_is_auth:mr,user_is_login:mr,device_id:mr,web_id:mr,ip_addr_id:mr,user_unique_id_type:mr},header:{app_id:mr,app_name:mr,app_install_id:mr,install_id:mr,app_package:mr,app_channel:mr,app_version:mr,ab_version:mr,os_name:r.os_name,os_version:r.os_version,device_model:r.device_model,ab_client:mr,traffic_type:mr,client_ip:mr,device_brand:mr,os_api:mr,access:mr,language:r.language,region:mr,app_language:mr,app_region:mr,creative_id:r.utm.creative_id,ad_id:r.utm.ad_id,campaign_id:r.utm.campaign_id,log_type:mr,rnd:mr,platform:r.platform,sdk_version:y9,sdk_lib:"js",province:mr,city:mr,timezone:mo,tz_offset:ma,tz_name:mr,sim_region:mr,carrier:mr,resolution:r.screen_width+"x"+r.screen_height,browser:r.browser,browser_version:r.browser_version,referrer:r.referrer,referrer_host:r.referrer_host,width:r.screen_width,height:r.screen_height,screen_width:r.screen_width,screen_height:r.screen_height,utm_term:r.utm.utm_term,utm_content:r.utm.utm_content,utm_source:r.utm.utm_source,utm_medium:r.utm.utm_medium,utm_campaign:r.utm.utm_campaign,tracer_data:u5(r.utm.tracer_data),custom:r.network_type?{network_type:r.network_type}:{},wechat_unionid:mr,wechat_openid:mr}},this.ab_version="",this.evtParams={},this.reportErrorCallback=function(){},this.isLast=!1,this.setCustom(r),this.initDomain(),this.initABData(),this.collect.on("route-change",function(e){n.changeReferInfo(e.config)}),this.setEnableClientTransport(!!this.initConfig.transport)}return e.prototype.initDomain=function(){var e=this.initConfig.channel_domain;if(e)this.domain=e;else{var t=this.initConfig.channel;this.domain=yL(y8[t])}},e.prototype.setDomain=function(e){this.domain=e},e.prototype.getDomain=function(){return this.domain},e.prototype.initABData=function(){var e="__tea_sdk_ab_version_"+this.initConfig.app_id,t=null;if(this.initConfig.ab_cross){var n=this.localStorage.getCookie(e,this.initConfig.ab_cookie_domain);t=n?JSON.parse(n):null}else t=this.localStorage.getItem(e);this.setAbCache(t)},e.prototype.setAbCache=function(e){this.ab_cache=e},e.prototype.getAbCache=function(){return this.ab_cache},e.prototype.setAbVersion=function(e){this.ab_version=e},e.prototype.getAbVersion=function(){return this.ab_version},e.prototype.clearAbCache=function(){this.ab_version="",this.ab_cache={}},e.prototype.getUrl=function(e){var t="";switch(e){case"event":t="/list";break;case"webid":t="/webid";break;case"tobid":t="/tobid"}var n,r=[];return r.push("aid="+this.initConfig.app_id+"&sdk_version="+y9+"&device_platform="+this.envInfo.header.platform),this.initConfig.caller&&r.push("caller="+this.initConfig.caller),n=""+this.getDomain()+t,r.length?n+"?"+r.join("&"):n},e.prototype.setCustom=function(e){if(e&&e.latest_data&&e.latest_data.isLast)for(var t in delete e.latest_data.isLast,this.isLast=!0,e.latest_data)this.envInfo.header.custom[t]=e.latest_data[t]},e.prototype.changeReferInfo=function(e){this.envInfo.header.referrer=e.referrer;var t="";try{t=new yo(e.referrer).host}catch(e){}this.envInfo.header.referrer_host=t||this.envInfo.header.referrer_host},e.prototype.setEnableClientTransport=function(e){this.enableClientTransport=e},e.prototype.getEnableClientTransport=function(){return this.enableClientTransport},e.prototype.set=function(e){var t,n=this;uC(t=uI(e)).call(t,function(t){void 0!==e[t]&&null!==e[t]||n.delete(t);try{n.eventCheck.calculate(t,"config")}catch(e){}if("traffic_type"===t&&n.isLast&&(n.envInfo.header.custom.$latest_traffic_source_type=e[t]),"evtParams"===t)n.evtParams=yz(yz({},n.evtParams||{}),e.evtParams||{});else if("_staging_flag"===t)n.evtParams=yz(yz({},n.evtParams||{}),{_staging_flag:e._staging_flag});else if("reportErrorCallback"===t&&"function"==typeof e[t])n.reportErrorCallback=e[t];else{var r,i,o,a="",s="";if(h6(t).call(t,".")>-1){var u=t.split(".");a=u[0],s=u[1]}a?"user"===a||"header"===a?n.envInfo[a][s]=e[t]:(n.envInfo.header.custom[s]=e[t],n.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 添加了自定义参数:"+t,level:"info",time:l$(),infoType:"sdk",secType:"HEADER",common:"custom"})):Object.hasOwnProperty.call(n.envInfo.user,t)?(h6(r=["user_type","ip_addr_id"]).call(r,t)>-1?n.envInfo.user[t]=e[t]?Number(e[t]):e[t]:h6(i=["user_id","web_id","user_unique_id","user_unique_id_type"]).call(i,t)>-1?n.envInfo.user[t]=e[t]?String(e[t]):e[t]:h6(o=["user_is_auth","user_is_login"]).call(o,t)>-1?n.envInfo.user[t]=!!e[t]:"device_id"===t&&(n.envInfo.user[t]=e[t]),n.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 修改了公共参数:"+t,level:"info",time:l$(),infoType:"sdk",secType:"USER",common:t})):Object.hasOwnProperty.call(n.envInfo.header,t)?(n.envInfo.header[t]=e[t],n.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 修改了公共参数:"+t,level:"info",time:l$(),infoType:"sdk",secType:"HEADER",common:t})):(n.envInfo.header.custom[t]=e[t],n.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 添加了自定义参数:"+t,level:"info",time:l$(),infoType:"sdk",secType:"HEADER",common:"custom"}))}})},e.prototype.get=function(e){try{return e?"evtParams"===e?this.evtParams:"reportErrorCallback"===e?this[e]:Object.hasOwnProperty.call(this.envInfo.user,e)?this.envInfo.user[e]:Object.hasOwnProperty.call(this.envInfo.header,e)?this.envInfo.header[e]:JSON.parse(u5(this.envInfo[e])):JSON.parse(u5(this.envInfo))}catch(e){this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:l$(),data:e.message})}},e.prototype.setStore=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};if(t&&uI(e).length){var n=uM(e,t);this.storage.setItem(this.configKey,n)}}catch(e){this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:l$(),data:e.message})}},e.prototype.getStore=function(){try{if(!this.configPersist)return null;var e=this.storage.getItem(this.configKey)||{};return e&&uI(e).length?e:null}catch(e){return this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:l$(),data:e.message}),null}},e.prototype.delete=function(e){try{if(!this.configPersist)return;var t=this.storage.getItem(this.configKey)||{};t&&Object.hasOwnProperty.call(t,e)&&(delete t[e],this.storage.setItem(this.configKey,t))}catch(e){this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:l$(),data:e.message})}},e}(),mu=function(){function e(e,t){this.isLog=t||!1,this.name=e||""}return e.prototype.info=function(e){this.isLog},e.prototype.warn=function(e){this.isLog},e.prototype.error=function(e){this.isLog},e.prototype.throw=function(e){throw this.error(this.name),Error(e)},e}(),mc=function(){function e(){this.spiderBot=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Sogou News Spider","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"]}return e.prototype.checkSpider=function(e){if(!e.enable_spider)return!1;var t,n=window.navigator.userAgent;if(!n)return!0;var r=!1;return uC(t=this.spiderBot).call(t,function(e){-1!==h6(n).call(n,e)&&(r=!0)}),r},e}(),ml=function(){function e(e,t){var n;this.configManager=t,this.native=e.enable_native||e[dr(n="evitaN".split("")).call(n).join("")],this.os=t.get("os_name"),this.currentUserUniqueId="",this.currentUserUniqueIdType=""}return e.prototype.error=function(e,t){},e.prototype.bridgeInject=function(){try{return!!this.native&&!!AppLogBridge&&(AppLogBridge.osName?this.os=AppLogBridge.osName():this.os=this.os,!0)}catch(e){return!1}},e.prototype.bridgeReady=function(){var e=this;return new uA(function(t,n){try{e.bridgeInject()?AppLogBridge.hasStarted(function(e){e?t(!0):n(!1)}):n(!1)}catch(e){n(!1)}})},e.prototype.setNativeAppId=function(e){try{AppLogBridge.setNativeAppId(u5(e))}catch(e){this.error("setNativeAppId error",e.message)}},e.prototype.setConfig=function(e){var t,n;try{var r=e.user_unique_id,i=e.user_unique_id_type,o=yA(e,["user_unique_id","user_unique_id_type"]);r&&i?this.setUserUniqueIdWithType(r,i):r?this.setUserUniqueId(r):i&&this.validateAndSetUserIdType(i);try{for(var a,s,u,c=(a=yv(o),s="function"==typeof pd&&pp(a),u=0,s?s.call(a):{next:function(){return a&&u>=a.length&&(a=void 0),{value:a&&a[u++],done:!a}}}),l=c.next();!l.done;l=c.next()){var f=yC(l.value,2),h=f[0],d=f[1];d?this.addHeaderInfo(h,d):this.removeHeaderInfo(h)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}}catch(e){this.error("setConfig error",e.message)}},e.prototype.setUserUniqueId=function(e){try{this.currentUserUniqueId=e,this.currentUserIdType=""}catch(e){this.error("setUserUniqueId error",e.message)}},e.prototype.validateAndSetUserIdType=function(e){this.currentUserUniqueId&&this.setUserUniqueIdWithType(this.currentUserUniqueId,e)},e.prototype.setUserUniqueIdWithType=function(e,t){try{this.currentUserUniqueId=e,this.currentUserUniqueIdType=t,AppLogBridge.setUserUniqueIdWithType(e,t)}catch(e){this.error("setUserUniqueType error",e.message)}},e.prototype.addHeaderInfo=function(e,t){try{AppLogBridge.addHeaderInfo(e,t)}catch(e){this.error("addHeaderInfo error",e.message)}},e.prototype.setHeaderInfo=function(e){try{AppLogBridge.setHeaderInfo(u5(e))}catch(e){this.error("setHeaderInfo error",e.message)}},e.prototype.removeHeaderInfo=function(e){try{AppLogBridge.removeHeaderInfo(e)}catch(e){this.error("removeHeaderInfo error",e.message)}},e.prototype.reportPv=function(e){this.onEventV3("predefine_pageview",e)},e.prototype.onEventV3=function(e,t){try{AppLogBridge.onEventV3(e,t)}catch(e){this.error("onEventV3 error",e.message)}},e.prototype.profileSet=function(e){try{AppLogBridge.profileSet(e)}catch(e){this.error("profileSet error",e.message)}},e.prototype.profileSetOnce=function(e){try{AppLogBridge.profileSetOnce(e)}catch(e){this.error("profileSetOnce error",e.message)}},e.prototype.profileIncrement=function(e){try{AppLogBridge.profileIncrement(e)}catch(e){this.error("profileIncrement error",e.message)}},e.prototype.profileUnset=function(e){try{AppLogBridge.profileUnset(e)}catch(e){this.error("profileUnset error",e.message)}},e.prototype.profileAppend=function(e){try{AppLogBridge.profileAppend(e)}catch(e){this.error("profileAppend error",e.message)}},e.prototype.setExternalAbVersion=function(e){try{AppLogBridge.setExternalAbVersion(e)}catch(e){this.error("setExternalAbVersion error",e.message)}},e.prototype.getVar=function(e,t,n){try{"harmonyos"===this.os||"android"===this.os?n(AppLogBridge.getABTestConfigValueForKey(e,t)):AppLogBridge.getABTestConfigValueForKey(e,t,function(e){n(e)})}catch(e){this.error("getVar error",e.message),n(t)}},e.prototype.getAllVars=function(e){try{"harmonyos"===this.os||"android"===this.os?e(AppLogBridge.getAllAbTestConfigs()):AppLogBridge.getAllAbTestConfigs(function(t){e(t)})}catch(t){this.error("getAllVars error",t.message),e(null)}},e.prototype.getAbSdkVersion=function(e){try{"harmonyos"===this.os||"android"===this.os?e(AppLogBridge.getAbSdkVersion()):AppLogBridge.getAbSdkVersion(function(t){e(t)})}catch(t){this.error("getAbSdkVersion error",t.message),e("")}},e}(),mf=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},mh=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.storage=new y3(!1,"session"),this.sessionKey="__tea_session_id_"+t.app_id,this.expireTime=t.expireTime||18e5,this.disableSession=t.disable_session,this.disableSessionTimeCheck=t.disable_session_check,this.disableSession||(this.setSessionId(),this.collect.on(mn.SessionReset,function(e){n.resetSessionId(e)}),this.collect.on(mn.SessionResetTime,function(){n.updateSessionIdTime()}))},e.prototype.updateSessionIdTime=function(){var e=this.storage.getItem(this.sessionKey);if(e&&e.sessionId){var t=e.timestamp;l$()-t>this.expireTime?e={sessionId:mf(),timestamp:l$()}:e.timestamp=l$(),this.storage.setItem(this.sessionKey,e),this.resetExpTime()}},e.prototype.setSessionId=function(){var e=this,t=this.storage.getItem(this.sessionKey);t&&t.sessionId?t.timestamp=l$():t={sessionId:mf(),timestamp:l$()},this.storage.setItem(this.sessionKey,t),this.disableSessionTimeCheck||(this.sessionExp=yy(function(){e.checkEXp()},this.expireTime))},e.prototype.getSessionId=function(){var e=this.storage.getItem(this.sessionKey);return this.disableSession?"":e&&e.sessionId?e.sessionId:""},e.prototype.resetExpTime=function(){var e=this;this.sessionExp&&(clearInterval(this.sessionExp),this.sessionExp=yy(function(){e.checkEXp()},this.expireTime))},e.prototype.resetSessionId=function(e){var t={sessionId:e||mf(),timestamp:l$()};this.storage.setItem(this.sessionKey,t)},e.prototype.checkEXp=function(){var e=this.storage.getItem(this.sessionKey);e&&e.sessionId&&l$()-e.timestamp+30>=this.expireTime&&(e={sessionId:mf(),timestamp:l$()},this.storage.setItem(this.sessionKey,e))},e}(),md=function(){function e(){this.eventLimit=50,this.enable_ttwebid=!1,this.eventCache=[],this.beconEventCache=[]}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=e.configManager,this.eventCheck=new mt(e,t),this.cacheStorgae=new y3(!0),this.localStorage=new y3(!1),this.maxReport=t.max_report||10,this.reportTime=t.reportTime||t.report_time||30,this.timeout=t.timeout||1e5,this.enable_ttwebid=t.enable_ttwebid,this.reportUrl=t.report_url||this.configManager.getUrl("event"),this.eventKey="__tea_cache_events_"+this.configManager.get("app_id"),this.beconKey="__tea_cache_events_becon_"+this.configManager.get("app_id"),this.abKey="__tea_sdk_ab_version_"+this.configManager.get("app_id"),this.refer_key="__tea_cache_refer_"+this.configManager.get("app_id"),this.pageId=mf(),this.collect.on(mn.Ready,function(){n.reportAll(!1)}),this.collect.on(mn.ConfigDomain,function(){n.reportUrl=n.configManager.getUrl("event")}),this.collect.on(mn.Event,function(e){n.event(e)}),this.collect.on(mn.BeconEvent,function(e){n.beconEvent(e)}),this.collect.on(mn.CleanEvents,function(){n.reportAll(!1)});var r=this.linster();this.collect.on(mn.DestoryInstance,function(){r&&r()})},e.prototype.linster=function(){var e=this,t=function(){e.reportAll(!0)};window.addEventListener("unload",t,!1),yB(t);var n=function(){"hidden"===document.visibilityState&&e.reportAll(!0)};return document.addEventListener("visibilitychange",n,!1),function(){window.removeEventListener("unload",t),window.removeEventListener("pagehide",t,!1),window.removeEventListener("beforeunload",t,!1),document.removeEventListener("visibilitychange",n,!1)}},e.prototype.reportAll=function(e){this.report(e),this.reportBecon()},e.prototype.event=function(e){var t=this;try{if(this.collect.destroy||this.collect.sdkStop)return;if(this.config.enable_ios_sendbeacon&&yM())return void this.beconEvent(e);var n=this.cacheStorgae.getItem(this.eventKey)||[],r=e;this.config.batch_event&&(r=this.batchEvent(e));var i=yI(r,n);if(this.cacheStorgae.setItem(this.eventKey,i),this.reportTimeout&&clearTimeout(this.reportTimeout),i.length>=this.maxReport)this.report(!1);else{var o=this.reportTime;this.reportTimeout=pS(function(){t.report(!1),t.reportTimeout=null},o)}}catch(e){this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 发生了异常",level:"error",time:l$(),data:e.message,infoType:"sdk"})}},e.prototype.beconEvent=function(e){if(!this.collect.destroy&&!this.collect.sdkStop){var t=yI(e,this.cacheStorgae.getItem(this.beconKey)||[]);this.cacheStorgae.setItem(this.beconKey,t),this.collect.tokenManager.getReady()&&this.collect.sdkReady&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(t)),!0))}},e.prototype.reportBecon=function(){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var e=this.cacheStorgae.getItem(this.beconKey)||[];e&&e.length&&(this.cacheStorgae.removeItem(this.beconKey),this.send(this.split(this.merge(e)),!0))}},e.prototype.report=function(e){if(!this.collect.destroy&&!this.collect.sdkStop&&this.collect.tokenManager.getReady()&&this.collect.sdkReady){var t=this.cacheStorgae.getItem(this.eventKey)||[];t.length&&(this.cacheStorgae.removeItem(this.eventKey),this.config.batch_event?this.send([t],e):this.sliceEvent(t,e))}},e.prototype.batchEvent=function(e){var t=[];if(e.length>this.eventLimit)for(var n=0;nthis.eventLimit)for(var n=0;n>t/4).toString(10):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,e)})().replace(/-/g,"")).call(e,0,19)},mv=function(){function e(){this.cacheToken={},this.enableCookie=!1,this.enable_ttwebid=!1,this.enableCustomWebid=!1}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.configManager=this.collect.configManager,this.storage=new y3(!1),this.tokenKey="__tea_cache_tokens_"+t.app_id,this.enable_ttwebid=t.enable_ttwebid,this.enableCustomWebid=t.enable_custom_webid,this.collect.on(mn.ConfigUuid,function(e){n.setUuid(e)}),this.collect.on(mn.ConfigWebId,function(e){n.setWebId(e)}),this.collect.on(mn.ConfigDiD,function(e){n.setDeviceId(e)}),this.enableCookie=t.cross_subdomain,this.expiresTime=t.cookie_expire||6048e5,this.cookieDomain=t.cookie_domain||"",this.checkStorage()},e.prototype.checkStorage=function(){var e=this;if(this.enableCookie){var t=this.storage.getCookie(this.tokenKey,this.cookieDomain);this.cacheToken=t&&"string"==typeof t?JSON.parse(t):{}}else this.cacheToken=this.storage.getItem(this.tokenKey)||{};this.tokenType=this.cacheToken&&this.cacheToken._type_?this.cacheToken._type_:"default","custom"!==this.tokenType||this.enableCustomWebid?this.enableCustomWebid?this.collect.on(mn.CustomWebId,function(){e.tokenReady=!0,e.collect.emit(mn.TokenComplete)}):this.checkEnv()||(this.enable_ttwebid?this.completeTtWid(this.cacheToken):this.check()):this.remoteWebid()},e.prototype.check=function(){this.cacheToken&&this.cacheToken.web_id?this.complete(this.cacheToken):this.config.disable_webid?this.complete({web_id:mp(),user_unique_id:this.configManager.get("user_unique_id")||mp()}):this.remoteWebid()},e.prototype.checkEnv=function(){var e=window.navigator.userAgent;if(-1!==h6(e).call(e,"miniProgram")||-1!==h6(e).call(e,"MiniProgram")){var t=yF(window.location.href);return!(!t||!t.Web_ID||(this.complete({web_id:""+t.Web_ID,user_unique_id:this.configManager.get("user_unique_id")||""+t.Web_ID}),0))}return!1},e.prototype.remoteWebid=function(){var e=this,t=this.configManager.getUrl("webid"),n={app_key:this.config.app_key,app_id:this.config.app_id,url:location.href,user_agent:window.navigator.userAgent,referer:document.referrer,user_unique_id:""};this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 发起WebID请求",logType:"fetch",level:"info",time:l$(),data:n,infoType:"sdk"}),this.collect.requestManager.useRequest({url:t,data:n,success:function(t){var n;if(t&&0===t.e)n=t.web_id,e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"WebID请求成功",logType:"fetch",level:"info",time:l$(),data:t,infoType:"sdk"});else{var r=mp();n=r,e.collect.configManager.set({localWebId:r}),e.collect.emit(mn.TokenError),e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"WebID请求返回值异常,采用本地生成",logType:"fetch",level:"warn",time:l$(),data:t,infoType:"sdk"}),e.collect.logger.warn("appid: "+e.config.app_id+" get webid error, use local webid~")}e.complete({web_id:e.configManager.get("web_id")||n,user_unique_id:e.configManager.get("user_unique_id")||n})},fail:function(){var t=mp();e.complete({web_id:e.configManager.get("web_id")||t,user_unique_id:e.configManager.get("user_unique_id")||t}),e.collect.configManager.set({localWebId:t}),e.collect.emit(mn.TokenError),e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"WebID请求网络异常,采用本地生成",logType:"fetch",level:"error",time:l$(),data:{localWebId:t},infoType:"sdk"}),e.collect.logger.warn("appid: "+e.config.app_id+", get webid error, use local webid~")},timeout:3e5})},e.prototype.complete=function(e){var t=e.web_id,n=e.user_unique_id,r=e.device_id;if(e.timestamp=l$(),this.collect.configManager.set({web_id:t,user_unique_id:n}),this.config.enable_device_id){var i=this.configManager.get("device_id")||r||t;this.collect.configManager.set({device_id:i}),e=yz(yz({},e),{device_id:i})}else(null==e?void 0:e.device_id)&&delete e.device_id;this.setStorage(e),this.tokenReady=!0,this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 完成用户信息设置",logType:"info",level:"info",time:l$(),data:{web_id:t,user_unique_id:n},infoType:"sdk"}),this.collect.emit(mn.TokenComplete)},e.prototype.completeTtWid=function(e){var t=e.user_unique_id||"",n=this.configManager.get("user_unique_id");(n||t)&&this.configManager.set({user_unique_id:n||t}),this.setStorage(e),this.tokenReady=!0,this.collect.emit(mn.TokenComplete)},e.prototype.setUuid=function(e){var t;if(e&&-1===h6(t=["null","undefined","Null","None"]).call(t,e)){var n=String(e),r=this.configManager.get("user_unique_id"),i=this.cacheToken&&this.cacheToken.user_unique_id;if(n===r&&n===i)return;this.configManager.set({user_unique_id:n}),this.cacheToken||(this.cacheToken={}),this.cacheToken.user_unique_id=n,this.cacheToken.timestamp=l$(),this.setStorage(this.cacheToken),this.collect.emit(mn.TokenChange,"uuid"),this.collect.emit(mn.SessionReset)}else this.clearUuid()},e.prototype.clearUuid=function(){this.config.enable_ttwebid||this.configManager.get("web_id")&&this.configManager.get("user_unique_id")!==this.configManager.get("web_id")&&(this.configManager.set({user_unique_id:this.configManager.get("web_id")}),this.cacheToken&&this.cacheToken.web_id&&(this.cacheToken.user_unique_id=this.cacheToken.web_id,this.cacheToken.timestamp=l$(),this.setStorage(this.cacheToken)),this.collect.emit(mn.TokenReset,"uuid"))},e.prototype.setWebId=function(e){if(e&&!this.config.enable_ttwebid){this.cacheToken&&this.cacheToken.web_id?this.cacheToken.web_id!==e&&(this.cacheToken.user_unique_id=this.cacheToken.web_id===this.cacheToken.user_unique_id?e:this.cacheToken.user_unique_id,this.cacheToken.web_id=e):(this.cacheToken={},this.cacheToken.web_id=e,this.cacheToken.user_unique_id=e),this.cacheToken.timestamp=l$();var t=this.configManager.get("web_id"),n=this.configManager.get("user_unique_id");n&&n!==t||(this.configManager.set({user_unique_id:e}),this.collect.emit(mn.TokenChange,"uuid")),t!==e&&(this.configManager.set({web_id:e}),this.collect.emit(mn.TokenChange,"webid")),this.setStorage(this.cacheToken)}},e.prototype.setDeviceId=function(e){this.configManager.set({device_id:e}),this.config.enable_device_id&&this.cacheToken&&(this.cacheToken.device_id=e,this.cacheToken.timestamp=l$(),this.setStorage(this.cacheToken))},e.prototype.setStorage=function(e){var t;e._type_=this.enableCustomWebid?"custom":"default",delete e[dr(t="diss".split("")).call(t).join("")],this.enableCookie||this.enable_ttwebid?(this.storage.setCookie(this.tokenKey,e,this.expiresTime,this.cookieDomain),this.enable_ttwebid&&(delete e.web_id,this.storage.setItem(this.tokenKey,e))):this.storage.setItem(this.tokenKey,e),this.cacheToken=e},e.prototype.getReady=function(){return this.tokenReady},e.prototype.getTobId=function(){var e=this;return new uA(function(t){if(e.config.channel_domain)t("");else{var n={app_id:e.config.app_id,user_unique_id:e.configManager.get("user_unique_id"),web_id:e.configManager.get("web_id"),user_unique_id_type:e.configManager.get("user_unique_id_type")};e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 发起GetToken请求",logType:"fetch",level:"info",time:l$(),data:n,infoType:"sdk"}),e.collect.requestManager.useRequest({url:e.configManager.getUrl("tobid"),data:n,success:function(n){n&&0===n.e?(t(n.tobid),e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"GetToken请求成功",logType:"fetch",level:"info",time:l$(),data:n,infoType:"sdk"})):(t(""),e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:l$(),data:n,infoType:"sdk"}))},fail:function(){t(""),e.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"GetToken请求失败",logType:"fetch",level:"error",time:l$(),infoType:"sdk"})},time:3e4,withCredentials:e.enable_ttwebid})}})},e}();function mg(e){for(var t=e.length;--t>=0;)e[t]=0}var my=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),mm=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m_=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),mb=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),mw=Array(576);mg(mw);var mS=Array(60);mg(mS);var mk=Array(512);mg(mk);var mE=Array(256);mg(mE);var mT=Array(29);mg(mT);var mz,mA,mC,mI,mx,mR=Array(30);function mD(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function mP(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}mg(mR);var mO=function(e){return e<256?mk[e]:mk[256+(e>>>7)]},mL=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},mM=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1},mU=function(e,t,n){var r,i,o=Array(16),a=0;for(r=1;r<=15;r++)a=a+n[r-1]<<1,o[r]=a;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=mN(o[s]++,s))}},mj=function(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},mF=function(e){e.bi_valid>8?mL(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},mG=function(e,t,n,r){var i=2*t,o=2*n;return e[i]>1;n>=1;n--)mV(e,o,n);i=u;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],mV(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,mV(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,u=t.dyn_tree,c=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)(o=u[2*u[2*(r=e.heap[n])+1]+1]+1)>p&&(o=p,v++),u[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=d&&(a=h[r-d]),s=u[2*r],e.opt_len+=s*(o+a),f&&(e.static_len+=s*(l[2*r+1]+a)));if(0!==v){do{for(o=p-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(o=p;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),r--)}}(e,t),mU(o,c,e.bl_count)},mW=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s>=7;r<30;r++)for(mR[r]=i<<7,e=0;e<1<0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),mK(e,e.l_desc),mK(e,e.d_desc),a=function(e){var t;for(mW(e,e.dyn_ltree,e.l_desc.max_code),mW(e,e.dyn_dtree,e.d_desc.max_code),mK(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*mb[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?mZ(e,t,n,r):4===e.strategy||o===i?(mM(e,2+(r?1:0),3),mH(e,mw,mS)):(mM(e,4+(r?1:0),3),function(e,t,n,r){var i;for(mM(e,t-257,5),mM(e,n-1,5),mM(e,r-4,4),i=0;i>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(mE[n]+256+1)]++,e.dyn_dtree[2*mO(t)]++),e.sym_next===e.sym_end},m0=function(e){mM(e,2,3),mB(e,256,mw),16===e.bi_valid?(mL(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},m1=function(e,t,n,r){for(var i=65535&e,o=e>>>16&65535,a=0;0!==n;){n-=a=n>2e3?2e3:n;do o=o+(i=i+t[r++]|0)|0;while(--a);i%=65521,o%=65521}return i|o<<16},m2=new Uint32Array(function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),m5=function(e,t,n,r){var i=r+n;e^=-1;for(var o=r;o>>8^m2[255&(e^t[o])];return -1^e},m4={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},m3={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},m6=mQ,m8=m$,m9=m3.Z_NO_FLUSH,m7=m3.Z_PARTIAL_FLUSH,_e=m3.Z_FULL_FLUSH,_t=m3.Z_FINISH,_n=m3.Z_BLOCK,_r=m3.Z_OK,_i=m3.Z_STREAM_END,_o=m3.Z_STREAM_ERROR,_a=m3.Z_DATA_ERROR,_s=m3.Z_BUF_ERROR,_u=m3.Z_DEFAULT_COMPRESSION,_c=m3.Z_FILTERED,_l=m3.Z_HUFFMAN_ONLY,_f=m3.Z_RLE,_h=m3.Z_FIXED,_d=m3.Z_DEFAULT_STRATEGY,_p=m3.Z_UNKNOWN,_v=m3.Z_DEFLATED,_g=573,_y=function(e,t){return e.msg=m4[t],t},_m=function(e){return 2*e-(e>4?9:0)},__=function(e){for(var t=e.length;--t>=0;)e[t]=0},_b=function(e){var t,n,r,i=e.w_size;r=t=e.hash_size;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);r=t=i;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},_w=function(e,t,n){return(t<e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},_k=function(e,t){mJ(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_S(e.strm)},_E=function(e,t){e.pending_buf[e.pending++]=t},_T=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},_z=function(e,t,n,r){var i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=m1(e.adler,t,i,n):2===e.state.wrap&&(e.adler=m5(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},_A=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,l=e.w_mask,f=e.prev,h=e.strstart+258,d=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(c[(n=t)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do;while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oa){if(e.match_start=t,a=r,r>=s)break;d=c[o+a-1],p=c[o+a]}}while((t=f[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead},_C=function(e){var t,n,r,i=e.w_size;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=i+(i-262)&&(e.window.set(e.window.subarray(i,i+i-n),0),e.match_start-=i,e.strstart-=i,e.block_start-=i,e.insert>e.strstart&&(e.insert=e.strstart),_b(e),n+=i),0===e.strm.avail_in)break;if(t=_z(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=t,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=_w(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=_w(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},_I=function(e,t){var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_out(r=e.strstart-e.block_start)+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,_S(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(_z(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===a);return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_wateri&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(_z(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water>3,o=(i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===_t)&&t!==m9&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,a=t===_t&&0===e.strm.avail_in&&n===r?1:0,m6(e,e.block_start,n,a),e.block_start+=n,_S(e.strm)),a?3:1)},_x=function(e,t){for(var n,r;;){if(e.lookahead<262){if(_C(e),e.lookahead<262&&t===m9)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=_w(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=_A(e,n)),e.match_length>=3){if(r=m8(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do e.strstart++,e.ins_h=_w(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=_w(e,e.ins_h,e.window[e.strstart+1])}else r=m8(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(_k(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===_t?(_k(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(_k(e,!1),0===e.strm.avail_out)?1:2},_R=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(_C(e),e.lookahead<262&&t===m9)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=_w(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=m8(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=_w(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(_k(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=m8(e,0,e.window[e.strstart-1]))&&_k(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=m8(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===_t?(_k(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(_k(e,!1),0===e.strm.avail_out)?1:2};function _D(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var _P=[new _D(0,0,0,0,_I),new _D(4,4,8,4,_x),new _D(4,5,16,8,_x),new _D(4,6,32,32,_x),new _D(4,4,16,16,_R),new _D(8,16,32,32,_R),new _D(8,16,128,128,_R),new _D(8,32,128,256,_R),new _D(32,128,258,1024,_R),new _D(32,258,258,4096,_R)];function _O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*_g),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),__(this.dyn_ltree),__(this.dyn_dtree),__(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),__(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),__(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var _L=function(e){if(!e)return 1;var t=e.state;return t&&t.strm===e&&(42===t.status||57===t.status||69===t.status||73===t.status||91===t.status||103===t.status||113===t.status||666===t.status)?0:1},_M=function(e){if(_L(e))return _y(e,_o);e.total_in=e.total_out=0,e.data_type=_p;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,mX(t),_r},_B=function(e){var t,n=_M(e);return n===_r&&((t=e.state).window_size=2*t.w_size,__(t.head),t.max_lazy_match=_P[t.level].max_lazy,t.good_match=_P[t.level].good_length,t.nice_match=_P[t.level].nice_length,t.max_chain_length=_P[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),n},_N=function(e,t,n,r,i,o){if(!e)return _o;var a=1;if(t===_u&&(t=6),r<0?(a=0,r=-r):r>15&&(a=2,r-=16),i<1||i>9||n!==_v||r<8||r>15||t<0||t>9||o<0||o>_h||8===r&&1!==a)return _y(e,_o);8===r&&(r=9);var s=new _O;return e.state=s,s.strm=e,s.status=42,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<_n||t<0)return e?_y(e,_o):_o;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==_t)return _y(e,0===e.avail_out?_s:_o);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(_S(e),0===e.avail_out)return n.last_flush=-1,_r}else if(0===e.avail_in&&_m(t)<=_m(r)&&t!==_t)return _y(e,_s);if(666===n.status&&0!==e.avail_in)return _y(e,_s);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){var i=_v+(n.w_bits-8<<4)<<8;if(i|=(n.strategy>=_l||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(i|=32),_T(n,i+=31-i%31),0!==n.strstart&&(_T(n,e.adler>>>16),_T(n,65535&e.adler)),e.adler=1,n.status=113,_S(e),0!==n.pending)return n.last_flush=-1,_r}if(57===n.status){if(e.adler=0,_E(n,31),_E(n,139),_E(n,8),n.gzhead)_E(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),_E(n,255&n.gzhead.time),_E(n,n.gzhead.time>>8&255),_E(n,n.gzhead.time>>16&255),_E(n,n.gzhead.time>>24&255),_E(n,9===n.level?2:n.strategy>=_l||n.level<2?4:0),_E(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(_E(n,255&n.gzhead.extra.length),_E(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=m5(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(_E(n,0),_E(n,0),_E(n,0),_E(n,0),_E(n,0),_E(n,9===n.level?2:n.strategy>=_l||n.level<2?4:0),_E(n,3),n.status=113,_S(e),0!==n.pending)return n.last_flush=-1,_r}if(69===n.status){if(n.gzhead.extra){for(var o=n.pending,a=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+a>n.pending_buf_size;){var s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>o&&(e.adler=m5(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex+=s,_S(e),0!==n.pending)return n.last_flush=-1,_r;o=0,a-=s}var u=new Uint8Array(n.gzhead.extra);n.pending_buf.set(u.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending+=a,n.gzhead.hcrc&&n.pending>o&&(e.adler=m5(e.adler,n.pending_buf,n.pending-o,o)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var c,l=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>l&&(e.adler=m5(e.adler,n.pending_buf,n.pending-l,l)),_S(e),0!==n.pending)return n.last_flush=-1,_r;l=0}c=n.gzindexl&&(e.adler=m5(e.adler,n.pending_buf,n.pending-l,l)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var f,h=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>h&&(e.adler=m5(e.adler,n.pending_buf,n.pending-h,h)),_S(e),0!==n.pending)return n.last_flush=-1,_r;h=0}f=n.gzindexh&&(e.adler=m5(e.adler,n.pending_buf,n.pending-h,h))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(_S(e),0!==n.pending))return n.last_flush=-1,_r;_E(n,255&e.adler),_E(n,e.adler>>8&255),e.adler=0}if(n.status=113,_S(e),0!==n.pending)return n.last_flush=-1,_r}if(0!==e.avail_in||0!==n.lookahead||t!==m9&&666!==n.status){var d=0===n.level?_I(n,t):n.strategy===_l?function(e,t){for(var n;;){if(0===e.lookahead&&(_C(e),0===e.lookahead)){if(t===m9)return 1;break}if(e.match_length=0,n=m8(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(_k(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===_t?(_k(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(_k(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===_f?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(_C(e),e.lookahead<=258&&t===m9)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+258;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=m8(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=m8(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(_k(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===_t?(_k(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(_k(e,!1),0===e.strm.avail_out)?1:2}(n,t):_P[n.level].func(n,t);if(3!==d&&4!==d||(n.status=666),1===d||3===d)return 0===e.avail_out&&(n.last_flush=-1),_r;if(2===d&&(t===m7?m0(n):t!==_n&&(m6(n,0,0,!1),t===_e&&(__(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),_S(e),0===e.avail_out))return n.last_flush=-1,_r}return t!==_t?_r:n.wrap<=0?_i:(2===n.wrap?(_E(n,255&e.adler),_E(n,e.adler>>8&255),_E(n,e.adler>>16&255),_E(n,e.adler>>24&255),_E(n,255&e.total_in),_E(n,e.total_in>>8&255),_E(n,e.total_in>>16&255),_E(n,e.total_in>>24&255)):(_T(n,e.adler>>>16),_T(n,65535&e.adler)),_S(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?_r:_i)},deflateEnd:function(e){if(_L(e))return _o;var t=e.state.status;return e.state=null,113===t?_y(e,_a):_r},deflateSetDictionary:function(e,t){var n=t.length;if(_L(e))return _o;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return _o;if(1===i&&(e.adler=m1(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(__(r.head),r.strstart=0,r.block_start=0,r.insert=0);var o=new Uint8Array(r.w_size);o.set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size}var a=e.avail_in,s=e.next_in,u=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,_C(r);r.lookahead>=3;){var c=r.strstart,l=r.lookahead-2;do r.ins_h=_w(r,r.ins_h,r.window[c+3-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--l);r.strstart=c,r.lookahead=2,_C(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=u,e.avail_in=a,r.wrap=i,_r}},_j={assign:function(e){for(var t=pv(Array.prototype).call(arguments,1);t.length;){var n,r,i=t.shift();if(i){if("object"!=ot(i))throw TypeError(i+"must be non-object");for(var o in i){;n=i,r=o,Object.prototype.hasOwnProperty.call(n,r)&&(e[o]=i[o])}}}return e},flattenChunks:function(e){for(var t=0,n=0,r=e.length;n=252?6:_V>=248?5:_V>=240?4:_V>=224?3:_V>=192?2:1;_G[254]=_G[254]=1;var _H={string2buf:function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,r,i,o,a=e.length,s=0;for(i=0;i>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},buf2string:function(e,t){var n,r,i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var o=Array(2*i);for(r=0,n=0;n4)o[r++]=65533,n+=s-1;else{for(a&=2===s?31:3===s?15:7;s>1&&n1?o[r++]=65533:a<65536?o[r++]=a:(a-=65536,o[r++]=55296|a>>10&1023,o[r++]=56320|1023&a)}}}return function(e,t){if(t<65534&&e.subarray&&_F)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var n="",r=0;re.length&&(t=e.length);for(var n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+_G[e[n]]>t?n:t}},_K=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},_W=Object.prototype.toString,_q=m3.Z_NO_FLUSH,_Y=m3.Z_SYNC_FLUSH,_Z=m3.Z_FULL_FLUSH,_X=m3.Z_FINISH,_Q=m3.Z_OK,_J=m3.Z_STREAM_END,_$=m3.Z_DEFAULT_COMPRESSION,_0=m3.Z_DEFAULT_STRATEGY,_1=m3.Z_DEFLATED;function _2(e){this.options=_j.assign({level:_$,method:_1,chunkSize:16384,windowBits:15,memLevel:8,strategy:_0},e||{});var t,n=this.options;n.raw&&n.windowBits>0?n.windowBits=-n.windowBits:n.gzip&&n.windowBits>0&&n.windowBits<16&&(n.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _K,this.strm.avail_out=0;var r=_U.deflateInit2(this.strm,n.level,n.method,n.windowBits,n.memLevel,n.strategy);if(r!==_Q)throw Error(m4[r]);if(n.header&&_U.deflateSetHeader(this.strm,n.header),n.dictionary){if(t="string"==typeof n.dictionary?_H.string2buf(n.dictionary):"[object ArrayBuffer]"===_W.call(n.dictionary)?new Uint8Array(n.dictionary):n.dictionary,(r=_U.deflateSetDictionary(this.strm,t))!==_Q)throw Error(m4[r]);this._dict_set=!0}}function _5(e,t){var n=new _2(t);if(n.push(e,!0),n.err)throw n.msg||m4[n.err];return n.result}_2.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?_X:_q,"string"==typeof e?i.input=_H.string2buf(e):"[object ArrayBuffer]"===_W.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===_Y||r===_Z)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((n=_U.deflate(i,r))===_J)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),n=_U.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===_Q;if(0!==i.avail_out){if(r>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},_2.prototype.onData=function(e){this.chunks.push(e)},_2.prototype.onEnd=function(e){e===_Q&&(this.result=_j.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _4=_2,_3=_5,_6=function(e,t){return(t=t||{}).raw=!0,_5(e,t)},_8=function(e,t){return(t=t||{}).gzip=!0,_5(e,t)},_9=function(e,t){var n,r,i,o,a,s,u,c,l,f,h,d,p,v,g,y,m,_,b,w,S,k,E,T,z=e.state;n=e.next_in,E=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,o=i-(t-e.avail_out),a=i+(e.avail_out-257),s=z.dmax,u=z.wsize,c=z.whave,l=z.wnext,f=z.window,h=z.hold,d=z.bits,p=z.lencode,v=z.distcode,g=(1<>>=_=m>>>24,d-=_,0==(_=m>>>16&255))T[i++]=65535&m;else{if(!(16&_)){if(!(64&_)){m=p[(65535&m)+(h&(1<<_)-1)];continue}if(32&_){z.mode=16191;break t}e.msg="invalid literal/length code",z.mode=16209;break t}for(b=65535&m,(_&=15)&&(d<_&&(h+=E[n++]<>>=_,d-=_),d<15&&(h+=E[n++]<>>=_=m>>>24,d-=_,!(16&(_=m>>>16&255))){if(!(64&_)){m=v[(65535&m)+(h&(1<<_)-1)];continue}e.msg="invalid distance code",z.mode=16209;break t}if(w=65535&m,d<(_&=15)&&(h+=E[n++]<s){e.msg="invalid distance too far back",z.mode=16209;break t}if(h>>>=_,d-=_,w>(_=i-o)){if((_=w-_)>c&&z.sane){e.msg="invalid distance too far back",z.mode=16209;break t}if(S=0,k=f,0===l){if(S+=u-_,_2;)T[i++]=k[S++],T[i++]=k[S++],T[i++]=k[S++],b-=3;b&&(T[i++]=k[S++],b>1&&(T[i++]=k[S++]))}else{S=i-w;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}break}}break}while(n>3,h&=(1<<(d-=b<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n=1&&0===I[w];w--);if(S>w&&(S=w),0===w)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(b=1;b0&&(0===e||1!==w))return -1;for(x[1]=0,m=1;m<15;m++)x[m+1]=x[m]+I[m];for(_=0;_852||2===e&&z>592)return 1;for(;;){p=m-E,a[_]+1=d?(v=R[a[_]-d],g=C[a[_]-d]):(v=96,g=0),u=1<>E)+(c-=u)]=p<<24|v<<16|g;while(0!==c);for(u=1<>=1;if(0!==u?(A&=u-1,A+=u):A=0,_++,0==--I[m]){if(m===w)break;m=t[n+a[_]]}if(m>S&&(A&f)!==l){for(0===E&&(E=S),h+=b,T=1<<(k=m-E);k+E852||2===e&&z>592)return 1;i[l=A&f]=S<<24|k<<16|h-o}}return 0!==A&&(i[h+A]=m-E<<24|4194304),s.bits=S,0},bi=m3.Z_FINISH,bo=m3.Z_BLOCK,ba=m3.Z_TREES,bs=m3.Z_OK,bu=m3.Z_STREAM_END,bc=m3.Z_NEED_DICT,bl=m3.Z_STREAM_ERROR,bf=m3.Z_DATA_ERROR,bh=m3.Z_MEM_ERROR,bd=m3.Z_BUF_ERROR,bp=m3.Z_DEFLATED,bv=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function bg(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var by,bm,b_=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<16180||t.mode>16211?1:0},bb=function(e){if(b_(e))return bl;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,bs},bw=function(e){if(b_(e))return bl;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,bb(e)},bS=function(e,t){if(b_(e))return bl;var n,r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?bl:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,bw(e))},bk=function(e,t){if(!e)return bl;var n=new bg;e.state=n,n.strm=e,n.window=null,n.mode=16180;var r=bS(e,t);return r!==bs&&(e.state=null),r},bE=!0,bT=function(e){if(bE){by=new Int32Array(512),bm=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(br(1,e.lens,0,288,by,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;br(2,e.lens,0,32,bm,0,e.work,{bits:5}),bE=!1}e.lencode=by,e.lenbits=9,e.distcode=bm,e.distbits=5},bz=function(e,t,n,r){var i,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=m5(n.check,A,2,0),c=0,l=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=16209;break}if((15&c)!==bp){e.msg="unknown compression method",n.mode=16209;break}if(l-=4,S=8+(15&(c>>>=4)),0===n.wbits&&(n.wbits=S),S>15||S>n.wbits){e.msg="invalid window size",n.mode=16209;break}n.dmax=1<>8&1),512&yE(n)&&4&n.wrap&&(A[0]=255&c,A[1]=c>>>8&255,n.check=m5(n.check,A,2,0)),c=0,l=0,n.mode=16182;case 16182:for(;l<32;){if(0===s)break t;s--,c+=r[o++]<>>8&255,A[2]=c>>>16&255,A[3]=c>>>24&255,n.check=m5(n.check,A,4,0)),c=0,l=0,n.mode=16183;case 16183:for(;l<16;){if(0===s)break t;s--,c+=r[o++]<>8),512&yE(n)&&4&n.wrap&&(A[0]=255&c,A[1]=c>>>8&255,n.check=m5(n.check,A,2,0)),c=0,l=0,n.mode=16184;case 16184:if(1024&yE(n)){for(;l<16;){if(0===s)break t;s--,c+=r[o++]<>>8&255,n.check=m5(n.check,A,2,0)),c=0,l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&yE(n)&&((d=n.length)>s&&(d=s),d&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+d),S)),512&yE(n)&&4&n.wrap&&(n.check=m5(n.check,r,d,o)),s-=d,o+=d,n.length-=d),n.length))break t;n.length=0,n.mode=16186;case 16186:if(2048&yE(n)){if(0===s)break t;d=0;do S=r[o+d++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S));while(S&&d>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;l<32;){if(0===s)break t;s--,c+=r[o++]<>>=7&l,l-=7&l,n.mode=16206;break}for(;l<3;){if(0===s)break t;s--,c+=r[o++]<>>=1)){case 0:n.mode=16193;break;case 1:if(bT(n),n.mode=16199,t===ba){c>>>=2,l-=2;break t}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=16209}c>>>=2,l-=2;break;case 16193:for(c>>>=7&l,l-=7&l;l<32;){if(0===s)break t;s--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=16209;break}if(n.length=65535&c,c=0,l=0,n.mode=16194,t===ba)break t;case 16194:n.mode=16195;case 16195:if(d=n.length){if(d>s&&(d=s),d>u&&(d=u),0===d)break t;i.set(r.subarray(o,o+d),a),s-=d,o+=d,u-=d,a+=d,n.length-=d;break}n.mode=16191;break;case 16196:for(;l<14;){if(0===s)break t;s--,c+=r[o++]<>>=5,l-=5,n.ndist=1+(31&c),c>>>=5,l-=5,n.ncode=4+(15&c),c>>>=4,l-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=16209;break}n.have=0,n.mode=16197;case 16197:for(;n.have>>=3,l-=3}for(;n.have<19;)n.lens[C[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},k=br(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,k){e.msg="invalid code lengths set",n.mode=16209;break}n.have=0,n.mode=16198;case 16198:for(;n.have>>16&255,m=65535&z,!((g=z>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<>>=g,l-=g,n.lens[n.have++]=m;else{if(16===m){for(T=g+2;l>>=g,l-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=16209;break}S=n.lens[n.have-1],d=3+(3&c),c>>>=2,l-=2}else if(17===m){for(T=g+3;l>>=g)),c>>>=3,l-=3}else{for(T=g+7;l>>=g)),c>>>=7,l-=7}if(n.have+d>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=16209;break}for(;d--;)n.lens[n.have++]=S}}if(16209===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=16209;break}if(n.lenbits=9,E={bits:n.lenbits},k=br(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,k){e.msg="invalid literal/lengths set",n.mode=16209;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},k=br(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,k){e.msg="invalid distances set",n.mode=16209;break}if(n.mode=16199,t===ba)break t;case 16199:n.mode=16200;case 16200:if(s>=6&&u>=258){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=l,_9(e,h),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,l=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;y=(z=n.lencode[c&(1<>>16&255,m=65535&z,!((g=z>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<>_)])>>>16&255,m=65535&z,!(_+(g=z>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<>>=_,l-=_,n.back+=_}if(c>>>=g,l-=g,n.back+=g,n.length=m,0===y){n.mode=16205;break}if(32&y){n.back=-1,n.mode=16191;break}if(64&y){e.msg="invalid literal/length code",n.mode=16209;break}n.extra=15&y,n.mode=16201;case 16201:if(n.extra){for(T=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;y=(z=n.distcode[c&(1<>>16&255,m=65535&z,!((g=z>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<>_)])>>>16&255,m=65535&z,!(_+(g=z>>>24)<=l);){if(0===s)break t;s--,c+=r[o++]<>>=_,l-=_,n.back+=_}if(c>>>=g,l-=g,n.back+=g,64&y){e.msg="invalid distance code",n.mode=16209;break}n.offset=m,n.extra=15&y,n.mode=16203;case 16203:if(n.extra){for(T=n.extra;l>>=n.extra,l-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=16209;break}n.mode=16204;case 16204:if(0===u)break t;if(d=h-u,n.offset>d){if((d=n.offset-d)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=16209;break}d>n.wnext?(d-=n.wnext,p=n.wsize-d):p=n.wnext-d,d>n.length&&(d=n.length),v=n.window}else v=i,p=a-n.offset,d=n.length;d>u&&(d=u),u-=d,n.length-=d;do i[a++]=v[p++];while(--d);0===n.length&&(n.mode=16200);break;case 16205:if(0===u)break t;i[a++]=n.length,u--,n.mode=16200;break;case 16206:if(n.wrap){for(;l<32;){if(0===s)break t;s--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _K,this.strm.avail_out=0;var n=bA.inflateInit2(this.strm,t.windowBits);if(n!==bD||(this.header=new bC,bA.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=_H.string2buf(t.dictionary):"[object ArrayBuffer]"===bI.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=bA.inflateSetDictionary(this.strm,t.dictionary))!==bD)))throw Error(m4[n])}function bU(e,t){var n=new bN(t);if(n.push(e),n.err)throw n.msg||m4[n.err];return n.result}bN.prototype.push=function(e,t){var n,r,i,o=this.strm,a=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?bR:bx,"[object ArrayBuffer]"===bI.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(a),o.next_out=0,o.avail_out=a),(n=bA.inflate(o,r))===bO&&s&&((n=bA.inflateSetDictionary(o,s))===bD?n=bA.inflate(o,r):n===bM&&(n=bO));o.avail_in>0&&n===bP&&o.state.wrap>0&&0!==e[o.next_in];)bA.inflateReset(o),n=bA.inflate(o,r);switch(n){case bL:case bM:case bO:case bB:return this.onEnd(n),this.ended=!0,!1}if(i=o.avail_out,o.next_out&&(0===o.avail_out||n===bP)){if("string"===this.options.to){var u=_H.utf8border(o.output,o.next_out),c=o.next_out-u,l=_H.buf2string(o.output,u);o.next_out=c,o.avail_out=a-c,c&&o.output.set(o.output.subarray(u,u+c),0),this.onData(l)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out))}if(n!==bD||0!==i){if(n===bP)return n=bA.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,!0;if(0===o.avail_in)break}}return!0},bN.prototype.onData=function(e){this.chunks.push(e)},bN.prototype.onEnd=function(e){e===bD&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=_j.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var bj=bN,bF=bU,bG=function(e,t){return(t=t||{}).raw=!0,bU(e,t)},bV=bU,bH={gzip:_8},bK=function(){function e(e,t){var n=this;this.requestType="",this.collector=e,this.config=t,this.requestType=t.request_type,this.supportBeacon=!(!window.navigator||!window.navigator.sendBeacon),this.errorCode={NO_URL:4001,IMG_ON:4e3,IMG_CATCH:4002,BEACON_FALSE:4003,XHR_ERROR:5002,TIMEOUT:5005,FETCH_ERROR:5006},this.errorMessage={BEACON_FALSE:"xhr sendbeacon error",XHR_ERROR:"xhr request error",BEACON:"xhr sendbeacon error",TIMEOUT:"xhr request timeout",FETCH_ERROR:"fetch network error",FETCH_RESPONSE_ERROR:"fetch response error"},this.customHeader=t.custom_request_header||{},this.collector.on(mn.CustomHeader,function(e){n.setRequestHeader(e)}),this.supportZip=!this.config.channel_domain}return e.prototype.setRequestHeader=function(e){this.customHeader=uM(this.customHeader,e)},e.prototype.useFetch=function(e){var t=this,n=e.url,r=e.data,i=e.method,o=e.success,a=e.fail,s=e.zip,u=e.timeout,c=e.useBeacon;if(window.fetch&&"undefined"!=typeof Request){if(c&&!("keepalive"in Request.prototype))return void this.useBeacon(e);var l={"Content-Type":"application/json; charset=utf-8"};if(uI(this.customHeader).length)for(var f in this.customHeader)l[f]=this.customHeader[f];var h=null;h="undefined"!=typeof AbortController?new AbortController:{signal:null,abort:function(){}};var d=pS(function(){h.abort()},u),p=u5(r);if(this.supportZip&&s&&this.config.need_zip){var v=(new TextEncoder).encode(p);p=bH.gzip(v),l["Content-Encoding"]="gzip"}var g=l$();try{fetch(n,{method:i||"POST",headers:l,body:p,keepalive:!0,signal:h.signal}).then(function(e){return e.ok||a&&a(r,e.status,g,e.statusText||t.errorMessage.FETCH_RESPONSE_ERROR),e.json()}).then(function(e){clearTimeout(d),o&&o(e,r,g,200)}).catch(function(e){clearTimeout(d),a&&a(r,t.errorCode.FETCH_ERROR,g,e.message||t.errorMessage.FETCH_ERROR)})}catch(t){this.useXhr(e),this.collector.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK useFetch 发送请求发生了一些问题",level:"error",time:l$(),data:t.message||"SDK useFetch has some errors",infoType:"sdk"})}}else c?this.useBeacon(e):(this.requestType="",this.useXhr(e))},e.prototype.useBeacon=function(e){var t=e.url,n=e.data,r=e.success,i=e.fail,o=l$();window.navigator.sendBeacon(t,u5(n))?r&&r({e:0},n,o,200):i&&i(n,this.errorCode.BEACON_FALSE,o,this.errorMessage.BEACON_FALSE)},e.prototype.useXhr=function(e){var t=this,n=e.url,r=e.data,i=e.method,o=e.success,a=e.fail,s=e.timeout,u=e.withCredentials,c=e.app_key,l=e.zip;try{var f=new XMLHttpRequest,h=l$();if(f.open(i||"POST",""+n,!0),f.setRequestHeader("Content-Type","application/json; charset=utf-8"),c&&f.setRequestHeader("X-MCS-AppKey",""+c),uI(this.customHeader).length)for(var d in this.customHeader)f.setRequestHeader(d,this.customHeader[d]);u&&(f.withCredentials=!0),s&&(f.timeout=s,f.ontimeout=function(){a&&a(r,t.errorCode.TIMEOUT,h,t.errorMessage.TIMEOUT)}),f.onload=function(){if(o){var e=null;if(f.responseText){try{e=JSON.parse(f.responseText)}catch(t){e={}}o(e,r,h,f.status)}}},f.onerror=function(){f.abort(),a&&a(r,t.errorCode.XHR_ERROR,h,t.errorMessage.XHR_ERROR)};try{var p=u5(r);if(this.config.need_zip&&l){if(this.supportZip){var v=(new TextEncoder).encode(p),g=bH.gzip(v);f.setRequestHeader("Content-Encoding","gzip"),f.send(g)}else f.send(p),this.collector.logger.warn("your channel do not support gzip, use normal data!")}else f.send(p)}catch(e){f.send(u5(r)),this.collector.emit("sdk-inner-error",{type:"sdk_error_send",eventData:r,errorCode:1e3,msg:e.message||e.stack||"sdk_error_send"})}}catch(e){this.collector.emit("sdk-inner-error",{type:"sdk_error_request",eventData:r,errorCode:1001,msg:e.message||e.stack||"sdk_error_request"}),this.collector.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK useXhr has some error",level:"error",time:l$(),data:e.message,infoType:"sdk"})}},e.prototype.useRequest=function(e){var t=e.useBeacon;this.config.transport&&this.collector.configManager.getEnableClientTransport()?this.useCustomRequest(e):this.requestType&&"xhr"===this.requestType?this.useXhr(e):t&&this.supportBeacon?this.useBeacon(e):this.requestType&&"fetch"===this.requestType?this.useFetch(e):this.useXhr(e)},e.prototype.useCustomRequest=function(e){var t=this.config.transport,n=e.url,r=e.data,i=e.success,o=e.fail;if(t)try{t.post({url:n,data:u5(r),success:function(e){i&&i(e,r)},fail:function(e){o&&o(e,r)}})}catch(t){this.collector.configManager.setEnableClientTransport(!1),this.useRequest(e),this.collector.emit("sdk-inner-error",{type:"sdk_transport_error",eventData:r,errorCode:1003,msg:t.message||t.stack||"sdk_transport_error"})}},e}(),bW=function(){function e(e){var t=this;this.onMove=function(e){if(t.isDragging){var n=e.clientX||e.touches[0].clientX,r=e.clientY||e.touches[0].clientY;if(t.clickAllowed){var i=Math.abs(n-t.initialX),o=Math.abs(r-t.initialY);(i>t.dragThreshold||o>t.dragThreshold)&&(t.clickAllowed=!1)}t.animationFrameId&&cancelAnimationFrame(t.animationFrameId),t.animationFrameId=requestAnimationFrame(function(){var n=e.touches?e.touches[0].clientX:e.clientX,r=e.touches?e.touches[0].clientY:e.clientY,i=n-t.offsetX,o=r-t.offsetY,a=window.innerWidth-t.element.offsetWidth,s=window.innerHeight-t.element.offsetHeight;i=Math.max(0,Math.min(i,a)),o=Math.max(0,Math.min(o,s)),t.element.style.transform="translate(\n "+(i-t.initialX)+"px, \n "+(o-t.initialY)+"px\n )"})}},this.onEnd=function(){if(t.isDragging){t.isDragging=!1;var e=new DOMMatrix(getComputedStyle(t.element).transform),n=t.initialX+e.m41,r=t.initialY+e.m42;t.element.style.left=n+"px",t.element.style.top=r+"px",t.element.style.transform="none",t.initialX=n,t.initialY=r,document.removeEventListener("mousemove",t.onMove),document.removeEventListener("mouseup",t.onEnd),document.removeEventListener("touchmove",t.onMove),document.removeEventListener("touchend",t.onEnd),pS(function(){t.clickAllowed=!0},50)}},this.element=e,this.isDragging=!1,this.animationFrameId=null,this.lastX=0,this.lastY=0,this.initialX=0,this.initialY=0,this.offsetX=0,this.offsetY=0,this.clickAllowed=!0,this.dragThreshold=1,this.initPosition(),this.bindEvents(),this.bindClickHandler()}return e.prototype.initPosition=function(){var e=this.element.getBoundingClientRect();this.element.style.position="fixed",this.element.style.left=e.left+"px",this.element.style.top=e.top+"px",this.element.style.transform="translate(0, 0)"},e.prototype.bindEvents=function(){var e,t;this.element.addEventListener("mousedown",yT(e=this.onStart).call(e,this)),this.element.addEventListener("touchstart",yT(t=this.onStart).call(t,this))},e.prototype.onStart=function(e){e.preventDefault(),this.initialX=e.clientX||e.touches[0].clientX,this.initialY=e.clientY||e.touches[0].clientY;var t=e.touches?e.touches[0].clientX:e.clientX,n=e.touches?e.touches[0].clientY:e.clientY,r=this.element.getBoundingClientRect();this.initialX=r.left,this.initialY=r.top,this.offsetX=t-this.initialX,this.offsetY=n-this.initialY,this.clickAllowed=!0,this.isDragging=!0,document.addEventListener("mousemove",this.onMove),document.addEventListener("mouseup",this.onEnd),document.addEventListener("touchmove",this.onMove),document.addEventListener("touchend",this.onEnd)},e.prototype.bindClickHandler=function(){var e=this;this.element.addEventListener("click",function(t){if(!e.clickAllowed)return t.stopImmediatePropagation(),void t.preventDefault();window&&window.postMessage({type:"devtool:web:open-draw"},location.origin)})},e}(),bq=function(){function e(e,t){this.devToolReady=!1,this.devToolOrigin="*",this.sendAlready=!1,this.hasLoadDevTools=!1,t.disable_debug||"Microsoft Internet Explorer"!==e.configManager.get("browser")&&(this.collect=e,this.config=t,this.app_id=t.app_id,this.cacheStorgae=new yJ,this.currentAppKey="__applog_load_devtool_web_"+this.app_id,this.loadUrl=t.devtool_url||yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz1bz1cz19z23z1ez49z25z1cz19z4az24z4ez4az4cz4az4dz4az1hz21"),this.filterEvent=new ls(["__bav_page","__bav_beat","__bav_page_statistics","__bav_click","__bav_page_exposure","bav2b_page","bav2b_beat","bav2b_page_statistics","bav2b_click","bav2b_page_exposure","_be_active","predefine_pageview","__profile_set","__profile_set_once","__profile_increment","__profile_unset","__profile_append","predefine_page_alive","predefine_page_close","abtest_exposure"]),this.load())}return e.prototype.loadScript=function(e){var t=this;try{var n=document.createElement("script");n.src=e,n.onerror=function(){},n.onload=function(){t.cacheStorgae.setLocalItem(t.currentAppKey,1)},document.getElementsByTagName("body")[0].appendChild(n),this.cacheStorgae.setLocalItem(this.currentAppKey,1)}catch(e){}},e.prototype.parseUrl=function(){var e={};try{var t=window.location.href.split("?")[1].split("&");t.length&&uC(t).call(t,function(t){var n=t.split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])})}catch(e){}return e},e.prototype.load=function(){try{var e=this.parseUrl();if(0==e.open_devtool_web)return void this.cacheStorgae.removeLocalItem("__applog_open_devtool_web");if(e.open_devtool_web&&e.app_id){if(hl(e.app_id)!==this.app_id)return}else if(!this.getStorage())return;this.addLintener(),this.loadBaseInfo(),this.loadHook(),this.setStorage(),this.loadDevTool()}catch(e){}},e.prototype.getStorage=function(){var e=this.cacheStorgae.getLocalItem("__applog_open_devtool_web");return e&&hl(e)===this.app_id},e.prototype.setStorage=function(){this.cacheStorgae.setLocalItem("__applog_open_devtool_web",this.app_id)},e.prototype.loadDevTool=function(){1==this.cacheStorgae.getLocalItem(this.currentAppKey)||(this.loadDebuggerModule(),this.loadScript(this.loadUrl))},e.prototype.loadBaseInfo=function(){if(this.log=[],this.event=[],this.info=[{title:"基本信息",key:"base",type:1,content:[{name:"app_id",desc:"APP_ID",value:this.config.app_id},{name:"channel",desc:"CHANNEL",value:this.config.channel},{name:"domain",desc:"上报域名",value:this.collect.configManager.getDomain()},{name:"sdk_version",desc:"SDK版本",value:y9},{name:"sdk_type",desc:"SDK引入方式",value:"npm"}]},{title:"用户信息",key:"user",type:2,content:[{name:"uuid",desc:"UUID",value:this.collect.configManager.get("user").user_unique_id||""},{name:"web_id",desc:"WEB_ID",value:this.collect.configManager.get("user").web_id||""}]},{title:"公共参数信息",type:2,key:"common",content:[{name:"browser",desc:"浏览器",value:this.collect.configManager.get("browser")},{name:"browser_version",desc:"浏览器版本",value:this.collect.configManager.get("browser_version")},{name:"platform",desc:"平台",value:this.collect.configManager.get("platform")},{name:"device_model",desc:"设备型号",value:this.collect.configManager.get("device_model")},{name:"os_name",desc:"操作系统",value:this.collect.configManager.get("os_name")},{name:"os_version",desc:"操作系统版本",value:this.collect.configManager.get("os_version")},{name:"resolution",desc:"屏幕分辨率",value:this.collect.configManager.get("resolution")},{name:"referrer",desc:"来源",value:this.collect.configManager.get("referrer")},{name:"custom",desc:"自定义信息",value:u5(this.collect.configManager.get("custom"))}]},{title:"配置信息",key:"config",type:3,content:[{name:"autotrack",desc:"全埋点",value:!!this.config.autotrack},{name:"stay",desc:"停留时长",value:!!this.config.enable_stay_duration}]},{title:"A/B配置信息",key:"ab",type:4,content:[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test}]}],this.config.enable_ab_test){var e=this.getInfo("ab"),t=[{name:"ab",desc:"A/B实验",value:!!this.config.enable_ab_test},{name:"vid",desc:"已曝光VID",value:this.collect.configManager.getAbVersion()},{name:"ab_domain",desc:"A/B域名",value:this.config.ab_channel_domain||yL(y6[this.config.channel])},{name:"all_values",desc:"全部配置",value:this.collect.configManager.getAbCache()}];e.content=t,this.setInfo("ab",e)}if(this.config.enable_native||this.config.Native){var n={title:"客户端信息",type:3,content:[{name:"native",desc:"是否打通",value:!!this.collect.bridgeReport}]};this.setInfo("native",n)}if(fl(y9).call(y9,"tob")){var r,i=this.getInfo("user");i.content.push({name:"sid",desc:dr(r="DISS".split("")).call(r).join(""),value:"点击获取"}),this.setInfo("user",i)}},e.prototype.getInfo=function(e){var t,n=null;return uC(t=this.info).call(t,function(t){t.key===e&&(n=t)}),n},e.prototype.setInfo=function(e,t){var n,r=!1;uC(n=this.info).call(n,function(n){n.key===e&&(r=!0,n=t)}),r||this.info.push(t)},e.prototype.getSecondInfo=function(e,t){var n,r=this.getInfo(e),i=null;return uC(n=r.content).call(n,function(e){e.name===t&&(i=e)}),i},e.prototype.setSecondInfo=function(e,t,n){var r,i=this.getInfo(e),o=!1;if(uC(r=i.content).call(r,function(e){e.name===t&&(e.value=n,o=!0)}),!o){var a={name:t,value:n,desc:t.toLocaleUpperCase()};i.content.push(a)}this.setInfo(e,i)},e.prototype.loadHook=function(){var e=this;this.collect.on(yq.DEBUGGER_MESSAGE,function(t){switch(t.type){case yq.DEBUGGER_MESSAGE_SDK:var n={time:t.time,type:t.logType||"sdk",infoType:t.infoType||"sdk",level:t.level,name:t.info,show:!0,levelShow:!0,needDesc:!!t.data};if(t.data&&(n.desc={content:u5(t.data)}),e.updateLog(n),t.secType&&"AB"===t.secType)e.setSecondInfo("ab","vid",e.collect.configManager.getAbVersion()),e.setSecondInfo("ab","all_values",e.collect.configManager.getAbCache());else if("USER"===t.secType)e.setSecondInfo("user","user_unique_id"===t.common?"uuid":t.common,e.collect.configManager.get(t.common));else if("HEADER"===t.secType){var r=e.collect.configManager.get(t.common);e.setSecondInfo("common",t.common,"custom"===t.common?u5(r):r)}return void e.updateInfo();case yq.DEBUGGER_MESSAGE_EVENT:if(t.data&&t.data.length){var i=t.data[0],o=i.events;if(!o.length)return;uC(o).call(o,function(n){n.checkShow=!0,n.searchShow=!0,n.focusShow=!0,n.status=t.status,n.type=e.filterEvent.has(n.event)?"sdk":"cus",n.verifyType=t.verifyType?"verify":"no",n.info="","fail"===t.status&&(n.info={message:"code: "+t.code+", msg: "+(t.msg||t.failType)})}),e.updateEvent(i)}return}})},e.prototype.addLintener=function(){var e=this;window.addEventListener("beforeunload",function(){e.cacheStorgae.removeLocalItem(e.currentAppKey)}),window.addEventListener("pagehide",function(){e.cacheStorgae.removeLocalItem(e.currentAppKey)}),window.addEventListener("message",function(t){if(t&&t.data&&"devtool:web:ready"===t.data.type){if(e.devToolOrigin=t.origin,e.devToolReady=!0,e.sendAlready)return;e.sendData("devtool:web:init",{info:e.info,log:e.log,event:e.event,sdk_type:fl(y9).call(y9,"tob")?"tob":"inner",appId:e.app_id}),e.sendAlready=!0}t&&t.data&&"devtool:web:ssid"===t.data.type&&e.collect.getToken(function(t){e.setSecondInfo("user","sid",t.tobid),e.updateInfo()})})},e.prototype.sendData=function(e,t){try{window&&window.postMessage({type:e,payload:t},this.devToolOrigin)}catch(e){}},e.prototype.updateInfo=function(){this.devToolReady&&this.sendData("devtool:web:info",this.info)},e.prototype.updateLog=function(e){this.devToolReady?this.sendData("devtool:web:log",e):this.log.push(e)},e.prototype.updateEvent=function(e){this.devToolReady?this.sendData("devtool:web:event",e):this.event.push(e)},e.prototype.loadDebuggerModule=function(){var e="#debugger-applog-web {\n position: fixed;\n width: 45px;\n height: 45px;\n background-image: url("+yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e")+");\n bottom: 5%;\n right: 10%;\n cursor: pointer;\n z-index:100;\n background-size: 45px;\n }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.appendChild(document.createTextNode(e)),t.appendChild(n);var r=document.createElement("div");r.innerHTML='
';var i=document.createElement("div");i.innerHTML='
',document.getElementsByTagName("body")[0].appendChild(r),document.getElementsByTagName("body")[0].appendChild(i),new bW(document.getElementById("debugger-applog-web"))},e}(),bY={autotrack:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z23z22z1mz22z20z18z1az1iz4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js"},object:"LogAutoTrack"},ab:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z19z4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js"},object:"LogAb"},stay:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz21z22z18z27z4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js"},object:"LogStay"},route:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1mz23z22z1cz4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js"},object:"LogRoute"},tracer:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz22z20z18z1az1cz20z4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js"},object:"LogTracer"},retry:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1cz22z20z27z4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js"},object:"LogRetry"},visual:{src:{cn:yL("1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz24z1gz21z23z18z1jz4az1hz21"),sg:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js",va:"https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js"},object:"LogVisual"}},bZ=["ab","autotrack","Stay","store","et","profile","cep","heartbeat","monitor","route","tracer"],bX=function(){function e(e){this.disableAutoPageView=!1,this.bridgeReport=!1,this.staging=!1,this.pluginInstances=[],this.sended=!1,this.started=!1,this.destroy=!1,this.sdkReady=!1,this.adapters={},this.loadType="base",this.sdkStop=!1,this.pageviewParams={},this.name=e,this.hook=new yR,this.remotePlugin=new d7,this.Types=mn,this.adapters.storage=y3,this.loadType="full"}return e.usePlugin=function(t,n,r){if(n){for(var i=!1,o=0,a=e.plugins.length;o-1})){var t,n=e.data;if("string"==typeof e.data)try{n=JSON.parse(e.data)}catch(e){n=void 0}if(n){var r=n.type,i=n.payload;bQ[r]&&uC(t=bQ[r]).call(t,function(t){"function"==typeof t&&t(e,i)})}}}var b1,b2="__rangers_ab_style__";(wv=b1||(b1={}))[wv.Var=0]="Var",wv[wv.All=1]="All";var b5=function(){function e(){this.fetchStatus="no",this.refreshFetchStatus="complete",this.versions=[],this.extVersions=[],this.mulilinkVersions=[],this.enable_multilink=!1,this.enable_ab_visual=!1,this.editMode=!1,this.callbacks=[],this.data=null,this.changeListener=new d7,this.readyStatus=!1,this.exposureCache=[]}return e.prototype.apply=function(e,t){var n=this;if(t.enable_ab_test){this.collect=e,this.config=t;var r=t.enable_multilink,i=t.ab_channel_domain,o=t.enable_ab_visual,a=t.ab_cross,s=t.ab_cookie_domain,u=t.ab_timeout,c=i||yL(y6[t.channel||"cn"]),l=e.adapters.storage,f=this.collect.Types;this.types=f,this.cacheStorgae=new l(!1),this.timeout=u||3e3,this.enable_multilink=r,this.enable_ab_visual=o,this.abKey="__tea_sdk_ab_version_"+t.app_id,this.ab_cross=a,this.ab_cookie_domain=s||"",this.fetchUrl=c+"/service/2/abtest_config/",this.reportUrl=""+e.configManager.getUrl("event"),this.exposureLimit=t.exposure_limit||20,this.ab_batch_time=t.ab_batch_time||500,this.ab_user_mode=t.ab_user_mode||"user_unique_id",this.callbackMap=new d7,this.collect.on(f.TokenChange,function(e){"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())}),this.collect.on(f.TokenReset,function(e){"uuid"===e&&n.readyStatus&&(n.clearCache(),n.fetchAB())}),this.collect.on(f.AbVar,function(e){var t=e.name,r=e.defaultValue,i=e.callback;n.getVar(t,r,i)}),this.collect.on(f.AbAllVars,function(e){n.getAllVars(e)}),this.collect.on(f.AbConfig,function(e){var t=e.params,r=e.callback;n.getABconfig(t,r)}),this.collect.on(f.AbExternalVersion,function(e){n.setExternalAbVersion(e)}),this.collect.on(f.AbOpenLayer,function(){n.openOverlayer()}),this.collect.on(f.AbCloseLayer,function(){n.closeOverlayer()}),this.collect.on(f.AbVersionChangeOn,function(e){n.changeListener.set(e,e)}),this.collect.on(f.AbVersionChangeOff,function(e){n.changeListener.get(e)&&n.changeListener.delete(e)}),this.loadMode(),(this.enable_ab_visual||this.enable_multilink)&&this.openOverlayer(this.config.multilink_timeout_ms||500),this.checkLocal(),this.ready("ab"),this.readyStatus||(this.fetchAB(),this.readyStatus=!0),this.collect.emit(f.AbReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!uI(n).length)return;var r=function(e){var r;n[e].length&&uC(r=n[e]).call(r,function(n){t.collect.hook.emit(e,n)})};for(var i in n)r(i)}},e.prototype.loadMode=function(){var e=function(){try{return JSON.parse(atob(window.name))||void 0}catch(e){return}}(),t="";if(e){var n=e.scenario,r=e.href;n?(this.editMode=!0,t=n):r&&(-1!==h6(r).call(r,"datatester")||-1!==h6(r).call(r,"visual-editor"))&&(this.editMode=!0,t="visual-editor")}this.enable_ab_visual&&"visual-editor"===t&&this.collect.destoryInstace()},e.prototype.checkLocal=function(){var e,t=this.getABCache(),n=t.ab_version,r=t.ab_ext_version,i=t.ab_version_multilink,o=t.data,a=this.checkFromUrl();a?this.mulilinkVersions.push(a):this.mulilinkVersions=i||[],this.extVersions=r||[],this.versions=n||[],this.data=o;var s=ll(e=this.versions).call(e,this.extVersions);this.enable_multilink&&(s=ll(s).call(s,this.mulilinkVersions)),this.configVersions(s.join(","))},e.prototype.checkFromUrl=function(){var e=yF(window.location.href);return e&&e.vid?e.vid:""},e.prototype.updateVersions=function(){var e,t,n=this.extVersions.length?ll(e=this.versions).call(e,this.extVersions):this.versions;this.enable_multilink&&(n=ll(n).call(n,this.mulilinkVersions)),this.configVersions(n.join(",")),this.updateABCache(),this.changeListener.size>0&&uC(t=this.changeListener).call(t,function(e){"function"==typeof e&&e(n)})},e.prototype.configVersions=function(e){this.collect.configManager.setAbVersion(e)},e.prototype.getVar=function(e,t,n){if(!e)throw Error("getVar key must not be empty");if("function"!=typeof n)throw Error("getVar callback must be a function");var r={name:e,defaultValue:t,callback:n,type:b1.Var};this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用GetVar",level:"info",time:l$(),data:e,infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealVar(r,e):(this.callbackMap.get(e),this.callbackMap.set(e,r))},e.prototype.getRealVar=function(e,t){var n=e.name,r=e.defaultValue,i=e.callback,o=this.data;if(o){var a=o[n];if(a&&yD(a)){var s,u,c=o[n].vid;return"$ab_url"===t?fl(s=this.mulilinkVersions).call(s,c)||this.mulilinkVersions.push(c):fl(u=this.versions).call(u,c)||this.versions.push(c),this.updateVersions(),this.fechEvent(c,t||n,r,i,a.val),void this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK执行GetVar,并曝光了实验"+n,level:"info",time:l$(),data:o[n],infoType:"sdk"})}this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK执行GerVar默认回调",level:"info",time:l$(),data:this.data,infoType:"sdk"}),i(r)}else i(r)},e.prototype.getAllVars=function(e){if("function"!=typeof e)throw Error("getAllVars callback must be a function");var t={callback:e,type:b1.All};this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 调用GetAllVars",level:"info",time:l$(),infoType:"cus"}),"complete"===this.fetchStatus&&"complete"===this.refreshFetchStatus?this.getRealAllVars(t):this.callbackMap.set("allVars",t)},e.prototype.getRealAllVars=function(e){(0,e.callback)(this.data?JSON.parse(u5(this.data)):{}),this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"SDK 执行GetAllVars",level:"info",time:l$(),data:this.data,infoType:"sdk"})},e.prototype.fechEvent=function(e,t,n,r,i){try{if(this.config.disable_track_event||!e)return;var o=this.collect.configManager.get(),a=o.header,s=o.user,u=this.getABCache(),c=s[this.ab_user_mode]||s.user_unique_id;if(u&&u.uuid&&u.uuid!==c)return;var l={event:"abtest_exposure",ab_sdk_version:""+e,params:u5({app_id:this.config.appId,ab_url:"$ab_url"===t?n:window.location.href}),local_time_ms:l$()};a.custom=u5(a.custom);this.reportExposure({events:[l],user:s,header:a},t),r&&r(i)}catch(e){this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 发生了异常",level:"error",time:l$(),data:e.message,infoType:"sdk"})}},e.prototype.reportExposure=function(e,t){var n=this;this.exposureCache.push(e),this.reportTimeout&&clearTimeout(this.reportTimeout),this.exposureCache.length>=this.exposureLimit?this.report(t):this.reportTimeout=pS(function(){n.report(t),clearTimeout(n.reportTimeout)},this.ab_batch_time)},e.prototype.report=function(e){var t,n=this;this.collect.requestManager.useRequest({url:this.reportUrl,data:this.exposureCache,timeout:2e4,useBeacon:"$ab_url"===e,zip:!0}),uC(t=this.exposureCache).call(t,function(e){n.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_EVENT,info:"曝光埋点上报成功",time:l$(),data:[e],code:200,status:"success",infoType:"sdk"})}),this.collect.emit(this.types.AbVerify,this.exposureCache),this.exposureCache=[]},e.prototype.setExternalAbVersion=function(e){this.extVersions=[e],this.updateVersions()},e.prototype.getABconfig=function(e,t){var n=uI(e);n&&n.length&&this.collect.configManager.set(e),this.fetchAB(t)},e.prototype.get=function(e){if(this.ab_cross){var t=this.cacheStorgae.getCookie(e,this.ab_cookie_domain);return t?JSON.parse(t):{}}return this.cacheStorgae.getItem(e)},e.prototype.set=function(e,t){this.ab_cross?this.cacheStorgae.setCookie(e,t,2592e6,this.ab_cookie_domain):this.cacheStorgae.setItem(e,t),this.collect.configManager.setAbCache(t)},e.prototype.getABCache=function(e){var t={ab_version:[],ab_ext_version:[],ab_version_multilink:[],data:null,timestamp:+new Date,uuid:""};return t=this.get(this.abKey)||t,e?t[e]:t},e.prototype.updateABCache=function(){var e=this.getABCache();e.ab_version_multilink=this.mulilinkVersions,e.ab_ext_version=this.extVersions,e.ab_version=this.versions,e.timestamp=l$(),this.set(this.abKey,e)},e.prototype.setAbCache=function(e){var t=this.getABCache();t.data=this.data,t.uuid=e,t.timestamp=l$(),this.set(this.abKey,t)},e.prototype.clearCache=function(){this.refreshFetchStatus="ing",this.data={},this.extVersions=[],this.mulilinkVersions=[],this.versions=[],this.collect.configManager.clearAbCache()},e.prototype.openOverlayer=function(e){var t=this;if(function(){if(!document.getElementById(b2)){var e="body { opacity: 0 !important; }",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.id=b2,n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}(),e)var n=pS(function(){t.closeOverlayer(),clearTimeout(n)},e)},e.prototype.closeOverlayer=function(){var e;(e=document.getElementById(b2))&&e.parentElement.removeChild(e)},e.prototype.fetchComplete=function(e,t){var n=this;try{if(e&&"[object Object]"==Object.prototype.toString.call(e)){var r,i,o,a=this.collect.configManager.get().user;if(t&&t!==a.user_unique_id)return;this.data=e,this.setAbCache(t);var s=[];uC(i=uI(e)).call(i,function(t){var n=e[t].vid;n&&s.push(n)}),this.versions=lC(o=this.versions).call(o,function(e){return fl(s).call(s,e)});var u=e.$ab_url,c=e.$ab_modification;if(c&&c.val&&this.enable_ab_visual){if(this.collect.destroy)return;this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 执行可视化实验",level:"info",logType:"fetch",time:l$(),infoType:"sdk",data:{$ab_modification:c}})}else if(u&&this.enable_multilink){this.mulilinkVersions=lC(l=this.mulilinkVersions).call(l,function(e){return fl(s).call(s,e)}),this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 执行多链接实验",level:"info",logType:"fetch",time:l$(),infoType:"sdk",data:{$ab_url:u}});var l,f=u.val,h=u.vid;f&&h&&this.getVar("$ab_url",f,function(){n.editMode||(f!==window.location.href?pS(function(){if(!n.collect.destroy){var e=""+f;e=-1===h6(e).call(e,"http")?"https://"+e:e,yj(e).host!==location.host?e=e+"&vid="+h:window.history.replaceState("","",e),window.location.href=e}},100):n.closeOverlayer())})}this.updateVersions()}else this.closeOverlayer();uC(r=this.callbackMap).call(r,function(e){return n[e.type===b1.Var?"getRealVar":"getRealAllVars"](e,"")})}catch(e){}},e.prototype.fetchAB=function(e){var t=this,n=this.collect.configManager.get(),r={header:yz(yz(yz({aid:this.config.app_id},n.user||{}),n.header||{}),{ab_sdk_version:this.collect.configManager.getAbVersion(),ab_url:window.location.href})};this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 发起AB实验请求",level:"info",logType:"fetch",time:l$(),data:r,infoType:"sdk"});var i=n.user[this.ab_user_mode]||n.user.user_unique_id;this.collect.requestManager.useRequest({url:this.fetchUrl,data:r,success:function(n){t.fetchStatus="complete",t.refreshFetchStatus="complete";var r=n.data;"success"===n.message?(t.fetchComplete(r,i),e&&e(r)):(t.fetchComplete(null,i),e&&e(null)),t.collect.emit(t.types.AbComplete,r),t.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求成功",level:"info",logType:"fetch",time:l$(),data:r,infoType:"sdk"})},fail:function(){t.fetchStatus="complete",t.refreshFetchStatus="complete",t.fetchComplete(null,i),t.collect.emit(t.types.AbTimeout),e&&e(null),t.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,secType:"AB",info:"AB实验请求网络异常",level:"error",logType:"fetch",time:l$(),infoType:"sdk"})},timeout:this.timeout})},e}(),b4=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;t.event_verify_url&&"string"==typeof t.event_verify_url&&(this.collect=e,this.url=t.event_verify_url+"/v1/list_test",e.on(e.Types.SubmitBefore,function(e){n.verify(e)}),e.on(e.Types.AbVerify,function(e){n.verify(e)}))},e.prototype.verify=function(e){this.collect.requestManager.useBeacon({url:this.url,data:e}),this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_EVENT,info:"SDK Report ByteIo Verify Request",time:l$(),data:e,code:200,status:"success",verifyType:!0})},e}();function b3(e,t,n){var r,i;if(void 0===t&&(t="list"),!e)return!1;if(t&&"list"===t){if(fl(r=["LI","TR","DL"]).call(r,e.nodeName)||e.dataset&&e.dataset.hasOwnProperty("teaIdx")||e.hasAttribute&&e.hasAttribute("data-tea-idx"))return!0}else if(fl(i=["A","BUTTON"]).call(i,e.nodeName)||e.dataset&&e.dataset.hasOwnProperty("teaContainer")||e.hasAttribute&&e.hasAttribute("data-tea-container")||n&&e.hasAttribute&&e.hasAttribute(n))return!0;return!1}var b6=function(e,t){return!!wt(e,t)};function b8(e,t){for(var n=e;n&&!b3(n,"container",t.container_attr||"");){if("HTML"===n.nodeName||"BODY"===n.nodeName)return e;n=n.parentElement}return n||e}var b9=function(e){if(!e)return"";var t,n,r="";try{e.textContent?r=hg(t=e.textContent).call(t).replace(/\s+/g,","):e.innerText&&(r=hg(n=e.innerText).call(n).replace(/\s+/g,",")),"input"!==e.tagName&&"INPUT"!==e.tagName||(r=e.value||"")}finally{return r}};function b7(e){try{for(var t=e;t&&t.parentNode;){if(t.hasAttribute("data-tea-ignore")||t.classList&&t.classList.contains("applog-web-devtools-con"))return!0;if("HTML"===t.nodeName||"body"===t.nodeName)break;t=t.parentNode}return!1}catch(e){return!1}}var we=function(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0},wt=function(e,t){if("string"==typeof t)return we(e,t);if(yP(t)){for(var n=!1,r=0;rthis.aliveDTime||l$()-this.pageStartTime>this.maxDuration)&&(!t||"hidden"!==document.visibilityState)&&(!this.hard||this.focusState)){var i=yz({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),duration:r,is_support_visibility_change:yN(),startTime:this.sessionStartTime,hidden:document.visibilityState,leave:e,mode:this.hard?"hard":"normal",focusState:this.focusState,blur:n,aliveType:this.options.container?"dom":"page"},this.options.params);this.options.container&&(i=uM(i,{element_path:wr(this.options.container).element_path,aliveType:this.options.container?"dom":"page"})),this.collect.beconEvent(this.options.aliveName,i),this.sessionStartTime=l$()}},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.setUpTimer=function(){var e=this;return this.timerHandler&&clearInterval(this.timerHandler),yy(function(){l$()-e.sessionStartTime>e.aliveDTime&&e.sendEvent(!1,!0)},1e3)},e.prototype.visibilitychange=function(){"hidden"===this.getDisplayStatus()?this.timerHandler&&(clearInterval(this.timerHandler),this.sendEvent(!1,!1)):"visible"===this.getDisplayStatus()&&(this.sessionStartTime=l$(),this.timerHandler=this.setUpTimer())},e.prototype.getDisplayStatus=function(){if(!this.options.container)return document.visibilityState;try{var e=window.getComputedStyle(this.options.container);return"none"!==e.display&&"hidden"!==e.visibility&&"0"!==e.opacity?"visible":"hidden"}catch(e){return"visible"}},e.prototype.beforeunload=function(){document.hidden||this.sendEvent(!0,!1)},e.prototype.muition=function(){var e=this;new MutationObserver(function(t){uC(t).call(t,function(t){e.visibilitychange()})}).observe(this.options.container,{attributes:!0,attributeFilter:["style"]})},e.prototype.enablePageAlive=function(){var e,t,n=this;this.timerHandler=this.setUpTimer();var r=yT(e=this.visibilitychange).call(e,this),i=yT(t=this.beforeunload).call(t,this);return this.options.container?this.muition():document.addEventListener("visibilitychange",r),window.addEventListener("pagehide",i),function(){n.beforeunload(),document.removeEventListener("visibilitychange",r),window.removeEventListener("pagehide",i)}},e.prototype.hardMode=function(){var e=this,t=function(){e.timerHandler&&(clearInterval(e.timerHandler),e.sendEvent(!1,!1,!0)),e.focusState=!1},n=function(){e.focusState=!0,e.sessionStartTime=l$(),e.timerHandler=e.setUpTimer()};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),wo=function(){function e(e,t){var n=this;this.maxDuration=432e5,this.aliveDTime=6e4,this.options={closeName:"predefine_page_close",params:{}},this.focusState=!0,this.visibilitychange=function(){"hidden"===document.visibilityState?n.activeEndTime=l$():"visible"===document.visibilityState&&(n.activeEndTime&&(n.totalTime+=n.activeEndTime-n.activeStartTime,n.activeTimes+=1),n.activeEndTime=void 0,n.activeStartTime=l$())},this.beforeunload=function(){if(n.totalTime+=(n.activeEndTime||l$())-n.activeStartTime,n.config.autotrack)try{window.sessionStorage.setItem("_tea_cache_duration",u5({duration:n.totalTime,page_title:document.title||location.pathname}))}catch(e){}n.sendEventPageClose()},this.collect=e,this.config=t,this.maxDuration=t.maxDuration||t.max_duration||864e5,this.pageStartTime=l$(),yD(t.enable_stay_duration)&&(this.options=uM(this.options,t.enable_stay_duration)),this.hard=this.options.mode&&"hard"===this.options.mode,this.focusState=document.hasFocus(),this.resetData()}return e.prototype.setParams=function(e,t,n){this.set_path=e,this.set_url=n,this.set_title=t},e.prototype.resetParams=function(e,t,n){this.url_path=e,this.url=n,this.title=t},e.prototype.enable=function(e,t,n){this.url_path=e,this.url=n,this.title=t,this.disableCallback=this.enablePageClose(),this.hard&&(this.removeMode=this.hardMode())},e.prototype.disable=function(){this.disableCallback(),this.hard&&this.removeMode&&this.removeMode(),this.resetData()},e.prototype.resetData=function(){this.activeStartTime=void 0===this.activeStartTime?this.pageStartTime:l$(),this.activeEndTime=void 0,this.activeTimes=1,this.totalTime=0,this.resetParams(location.pathname,document.title,location.href)},e.prototype.sendEventPageClose=function(){var e=l$()-this.pageStartTime;this.totalTime<0||e<0||this.totalTime>=this.maxDuration||this.hard&&!this.focusState||(this.collect.beconEvent(this.options.closeName,yz({url_path:this.getParams("url_path"),title:this.getParams("title"),url:this.getParams("url"),active_times:this.activeTimes,duration:this.totalTime,total_duration:e,is_support_visibility_change:yN(),mode:this.hard?"hard":"normal",focusState:this.focusState},this.options.params)),this.pageStartTime=l$(),this.resetData())},e.prototype.getParams=function(e){switch(e){case"url_path":return this.set_path||this.url_path||location.pathname;case"title":return this.set_title||this.title||document.title||location.pathname;case"url":return this.set_url||this.url||location.href}},e.prototype.enablePageClose=function(){var e,t,n=this,r=yT(e=this.visibilitychange).call(e,this),i=yT(t=this.beforeunload).call(t,this);return document.addEventListener("visibilitychange",r),window.addEventListener("pagehide",i),function(){n.beforeunload(),document.removeEventListener("visibilitychange",r),window.removeEventListener("pagehide",i)}},e.prototype.hardMode=function(){var e=this,t=function(){e.focusState=!1},n=function(){e.focusState=!0};return window.addEventListener("blur",t),window.addEventListener("focus",n),function(){window.removeEventListener("blur",t),window.removeEventListener("focus",n)}},e}(),wa=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;if(this.collect=e,this.config=t,this.config.enable_stay_duration){this.title=document.title||location.pathname,this.url=location.href,this.url_path=location.pathname,this.pageAlive=new wi(e,t),this.pageClose=new wo(e,t);var r=this.collect.Types;this.collect.on(r.DestoryInstance,function(){n.disable()}),this.collect.on(r.ResetStay,function(e){var t=e.url_path,r=e.title,i=e.url;n.resetStayDuration(t,r,i)}),this.collect.on(r.RouteChange,function(e){e.init||t.disable_route_report||n.resetStayDuration()}),this.collect.on(r.SetStay,function(e){var t=e.url_path,r=e.title,i=e.url;n.setStayParmas(t,r,i)}),this.enable(this.url_path,this.title,this.url),this.ready(r.Stay),this.collect.emit(r.StayReady)}},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!uI(n).length)return;var r=function(e){var r;n[e].length&&uC(r=n[e]).call(r,function(n){t.collect.hook.emit(e,n)})};for(var i in n)r(i)}},e.prototype.enable=function(e,t,n){this.pageAlive.enable(e,t,n),this.pageClose.enable(e,t,n)},e.prototype.disable=function(){this.pageAlive.disable(),this.pageClose.disable()},e.prototype.setStayParmas=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=""),void 0===n&&(n=""),this.pageAlive.setParams(e,t,n),this.pageClose.setParams(e,t,n),this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayParams",level:"info",time:l$(),data:{url_path:e,title:t,url:n}})},e.prototype.reset=function(e,t,n){this.disable(),this.enable(e,t,n)},e.prototype.resetStayDuration=function(e,t,n){this.reset(e,t,n),this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"SDK 执行 resetStayDuration",level:"info",time:l$(),data:{url_path:e,title:t,url:n}})},e}(),ws=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;this.collect=e,this.config=t,this.duration=6e4,this.reportUrl=e.configManager.getDomain()+"/profile/list";var r=e.Types;this.eventCheck=new mt(e,t),this.cache={},this.collect.on(r.ProfileSet,function(e){n.setProfile(e)}),this.collect.on(r.ProfileSetOnce,function(e){n.setOnceProfile(e)}),this.collect.on(r.ProfileUnset,function(e){n.unsetProfile(e)}),this.collect.on(r.ProfileIncrement,function(e){n.incrementProfile(e)}),this.collect.on(r.ProfileAppend,function(e){n.appendProfile(e)}),this.collect.on(r.ProfileClear,function(){n.cache={}}),this.ready(r.Profile)},e.prototype.ready=function(e){var t=this;if(this.collect.set(e),this.collect.hook._hooksCache.hasOwnProperty(e)){var n=this.collect.hook._hooksCache[e];if(!uI(n).length)return;var r=function(e){var r;n[e].length&&uC(r=n[e]).call(r,function(n){t.collect.hook.emit(e,n)})};for(var i in n)r(i)}},e.prototype.report=function(e,t){void 0===t&&(t={});try{if(this.config.disable_track_event)return;var n=[];n.push(this.collect.processEvent(e,t));var r=this.collect.eventManager.merge(n);this.collect.requestManager.useRequest({url:this.reportUrl,data:r}),this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_EVENT,info:"埋点上报成功",time:l$(),data:r,code:200,status:"success"})}catch(e){this.collect.emit(yq.DEBUGGER_MESSAGE,{type:yq.DEBUGGER_MESSAGE_SDK,info:"发生了异常",level:"error",time:l$(),data:e.message})}},e.prototype.setProfile=function(e){var t=this.formatParams(e);t&&uI(t).length&&(this.pushCache(t),this.report("__profile_set",yz(yz({},t),{profile:!0})))},e.prototype.setOnceProfile=function(e){var t=this.formatParams(e,!0);t&&uI(t).length&&(this.pushCache(t),this.report("__profile_set_once",yz(yz({},t),{profile:!0})))},e.prototype.incrementProfile=function(e){e&&this.report("__profile_increment",yz(yz({},e),{profile:!0}))},e.prototype.unsetProfile=function(e){if(e){var t={};t[e]="1",this.report("__profile_unset",yz(yz({},t),{profile:!0}))}},e.prototype.appendProfile=function(e){if(e){var t,n={};for(var r in e)("string"==typeof e[r]||"Array"===pv(t=Object.prototype.toString.call(e[r])).call(t,8,-1))&&(n[r]=e[r]);uI(n).length&&this.report("__profile_append",yz(yz({},n),{profile:!0}))}},e.prototype.pushCache=function(e){var t,n=this;uC(t=uI(e)).call(t,function(t){n.cache[t]={val:n.clone(e[t]),timestamp:l$()}})},e.prototype.formatParams=function(e,t){var n=this;void 0===t&&(t=!1);try{if(!e||"[object Object]"!==Object.prototype.toString.call(e))return;var r,i,o={};for(var a in e)("string"==typeof e[a]||"number"==typeof e[a]||"Array"===pv(i=Object.prototype.toString.call(e[a])).call(i,8,-1))&&(o[a]=e[a]);var s=uI(o);if(!s.length||!this.eventCheck.checkEventParams(o))return;var u=l$();return fJ(r=lC(s).call(s,function(r){var i=n.cache[r];return t?!i:!(i&&n.compare(i.val,e[r])&&u-i.timestampthis.sessionInterval&&(this.clearInterval(),this.endCurrentSession(),this.setInterval())},e}(),wc=function(){function e(){}return e.prototype.apply=function(e,t){var n=this;t.channel_domain||t.disable_track_event||t.disable_sdk_monitor||(this.collect=e,this.config=t,this.url=e.configManager.getUrl("event"),this.collect.on(e.Types.Ready,function(){n.sdkOnload()}),this.collect.on(e.Types.SubmitError,function(e){var t=e.type,r=e.eventData,i=e.errorCode,o=e.response;"f_data"===t&&n.sdkError(r,i,o)}),this.collect.on(e.Types.SDKInnerError,function(e){var t=e.type,r=e.eventData,i=e.errorCode,o=e.msg;n.sdkInnerError(t,r,i,o)}))},e.prototype.sdkOnload=function(){var e=this;try{var t=this.collect.configManager.get(),n=t.header,r=t.user,i=n.app_id,o=n.app_name,a=n.sdk_version,s=r.web_id,u={events:[{event:"onload",params:u5({app_id:i,app_name:o||"",sdk_version:a,sdk_type:"npm",sdk_config:this.config,sdk_desc:"TOC",url:location.href}),local_time_ms:l$()}],user:{user_unique_id:s},header:{}};pS(function(){e.collect.requestManager.useXhr({url:e.url,data:[u],timeout:3e4,app_key:"566f58151b0ed37e"})},16)}catch(e){}},e.prototype.sdkError=function(e,t,n){var r=this;try{var i=e[0],o=i.user,a=i.header,s=[];uC(e).call(e,function(e){var t;uC(t=e.events).call(t,function(e){s.push(e)})});var u={events:lD(s).call(s,function(e){return{event:"on_error",params:u5({type:"sdk_event_error",error_code:t,app_id:a.app_id,app_name:a.app_name||"",error_event:e.event,sdk_version:a.sdk_version,local_time_ms:e.local_time_ms,tea_event_index:l$(),params:e.params,header:a,user:o,err_msg:n.m||""}),local_time_ms:l$()}}),user:{user_unique_id:o.user_unique_id},header:{}};pS(function(){r.collect.requestManager.useXhr({url:r.url,data:[u],timeout:3e4,app_key:"566f58151b0ed37e"})},16)}catch(e){}},e.prototype.sdkInnerError=function(e,t,n,r){var i=this;try{var o=t[0],a=o.user,s=o.header,u=[];uC(t).call(t,function(e){var t;uC(t=e.events).call(t,function(e){u.push(e)})});var c={events:lD(u).call(u,function(t){return{event:"on_error",params:u5({type:e,error_code:n,app_id:s.app_id,app_name:s.app_name||"",error_event:t.event,sdk_version:s.sdk_version,local_time_ms:t.local_time_ms,tea_event_index:l$(),params:t.params,header:s,user:a,ua:window.navigator.userAgent,err_msg:r}),local_time_ms:l$()}}),user:a,header:{}};pS(function(){i.collect.requestManager.useXhr({url:i.url,data:[c],timeout:3e4,app_key:"566f58151b0ed37e"})},16)}catch(e){}},e}(),wl=function(e){if(e.children.length){var t,n=e.children;return!hJ(t=pv([]).call(n)).call(t,function(e){return e.children.length>0})}return!0},wf=function(e){if("svg"===e.tagName.toLowerCase())return!0;for(var t=e.parentElement,n=!1;t;)"svg"===t.tagName.toLowerCase()?(t=null,n=!0):t=t.parentElement;return n},wh=function(){function e(e,t,n){var r=this;this.statistics=!1,this.pageView=!1,this.clickEvent=function(e){(function(e,t){var n;if(1!==e.nodeType||!t.svg&&wf(e)||fl(n=["HTML","BODY"]).call(n,e.tagName.toUpperCase()))return!1;return!("none"===e.style.display||!b3(e,"container",t.container_attr||"")&&!(function(e,t){for(var n=e;n&&!b3(n,"container",t.container_attr||"");){if("HTML"===n.nodeName||"BODY"===n.nodeName)return!1;n=n.parentElement}return!0}(e,t)||wl(e)||t.svg))})(e.target,r.options)&&r.eventHandel({eventType:"dom",eventName:"click"},e)},this.changeEvent=function(e){r.eventHandel({eventType:"dom",eventName:"change"},e)},this.submitEvent=function(e){r.eventHandel({eventType:"dom",eventName:"submit"},e)},this.getPageViewEvent=function(e,t){t&&"pushState"===t&&r.eventHandel({eventType:"dom",eventName:"beat"},yz({beat_type:0},e)),r.eventHandel({eventType:"dom",eventName:"page_view"},e)},this.getPageLoadEvent=function(e){r.eventHandel({eventType:"dom",eventName:"page_statistics"},{lcp:e})},this.config=n.getConfig().eventConfig,this.collect=t,this.options=e,this.beatTime=e.beat,this.domContainer=e.container||document}return e.prototype.init=function(e){this.eventHandel=e;var t=this.config.mode;this.addListener(t)},e.prototype.addListener=function(e){var t,n=this;if("proxy-capturing"===e){if(this.config.click&&(yP(this.domContainer)?uC(t=this.domContainer).call(t,function(e){e.addEventListener("click",n.clickEvent,!0)}):this.domContainer.addEventListener("click",this.clickEvent,!0)),this.config.pv){this.collect.on("route-change",function(e){var t=e.config,r=e.name;n.getPageViewEvent(t,r),n.pageView=!0});var r=pS(function(){n.pageView||(n.getPageViewEvent(n.getDefaultConfig()),n.pageView=!0,clearTimeout(r))},2e3)}if(this.config.beat){try{"complete"===document.readyState?this.beatEvent(this.beatTime):window.addEventListener("load",function(){n.beatEvent(n.beatTime)});var i=0,o=null;window.addEventListener("scroll",function(){clearTimeout(o),o=pS(a,500),i=document.documentElement.scrollTop||document.body.scrollTop});var a=function(){(document.documentElement.scrollTop||document.body.scrollTop)==i&&n.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:1})}}catch(e){}try{var s=window.performance&&window.performance.getEntriesByType("paint");if(s&&s.length){new PerformanceObserver(function(e){var t=e.getEntries(),r=t[t.length-1],i=r.renderTime||r.loadTime;n.statistics||(n.getPageLoadEvent(i),n.statistics=!0)}).observe({entryTypes:["largest-contentful-paint"]});var u=pS(function(){n.statistics||(n.getPageLoadEvent(s[0].startTime||0),n.statistics=!0,clearTimeout(u))},2e3)}else this.getPageLoadEvent(0)}catch(e){this.getPageLoadEvent(0)}}}},e.prototype.removeListener=function(){var e,t=this;yP(this.domContainer)?uC(e=this.domContainer).call(e,function(e){e.removeEventListener("click",t.clickEvent,!0)}):this.domContainer.removeEventListener("click",this.clickEvent,!0)},e.prototype.beatEvent=function(e){var t,n=this;try{this.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:3}),this.beatTime&&(t=yy(function(){n.eventHandel({eventType:"dom",eventName:"beat"},{beat_type:2})},e)),yB(function(){n.eventHandel({eventType:"dom",eventName:"beat",eventSend:"becon"},{beat_type:0}),n.beatTime&&clearInterval(t)})}catch(e){}},e.prototype.getDefaultConfig=function(){return{is_html:1,url:location.href,referrer:document.referrer,page_key:location.href,refer_page_key:document.referrer,page_title:document.title||location.pathname,page_manual_key:"",refer_page_manual_key:"",refer_page_title:"",page_path:location.pathname,page_host:location.host}},e}(),wd={eventConfig:{mode:"proxy-capturing",submit:!1,click:!0,change:!1,pv:!0,beat:!0,hashTag:!1,impr:!1},scoutConfig:{mode:"xpath"}},wp=function(){function e(e,t){this.config=e,this.config.eventConfig=uM(this.config.eventConfig,t)}return e.prototype.getConfig=function(){return this.config},e.prototype.setConfig=function(e){return this.config=e},e}(),wv,wg,wy=function(e,t,n,r,i){return yz(yz({event:e},function(e,t,n,r){var i,o,a,s,u,c,l,f,h={},d=function(e){if(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return{left:t.left,top:t.top,element_width:n,element_height:r}}}(t=b8(t,n)),p=(void 0===(i=e)&&(i={}),void 0===(o=d)&&(o={}),a=i.clientX,s=i.clientY,u=o.left,{touch_x:Math.floor(a-u>=0?a-u:0),touch_y:Math.floor(s-(c=o.top)>=0?s-c:0)}),v=d.element_width,g=d.element_height,y=p.touch_x,m=p.touch_y,_=wr(t),b=_.element_path,w=_.positions,S=(l=b8(t,n),f=[],function e(t){var n,r,i,o=(i="",3===t.nodeType?i=hg(n=t.textContent).call(n):t.dataset&&t.dataset.hasOwnProperty("teaTitle")||t.hasAttribute("ata-tea-title")?i=t.getAttribute("data-tea-title"):"INPUT"===t.nodeName&&fl(r=["button","submit"]).call(r,t.getAttribute("type"))?i=t.getAttribute("value"):"IMG"===t.nodeName&&t.getAttribute("alt")&&(i=t.getAttribute("alt")),pv(i).call(i,0,200));if(o&&-1===h6(f).call(f,o)&&f.push(o),t.childNodes.length>0)for(var a=t.childNodes,s=0;s0?i:0)),t.page_start_ms=r.navigationStart}catch(e){}return t},e.prototype.handleBeadtEvent=function(e){e.event=this.eventName.beat,e.page_key=window.location.href,e.is_html=1,e.page_title=document.title,e.page_manual_key=this.initConfig.autotrack.page_manual_key||"";try{e.page_viewport_width=window.innerWidth,e.page_viewport_height=window.innerHeight,e.page_total_width=document.documentElement.scrollWidth,e.page_total_height=document.documentElement.scrollHeight,e.scroll_width=document.documentElement.scrollLeft+window.innerWidth,e.scroll_height=document.documentElement.scrollTop+window.innerHeight,e.since_page_start_ms=l$()-window.performance.timing.navigationStart,e.page_start_ms=window.performance.timing.navigationStart}catch(e){}return e},e.prototype.handleExposureEvent=function(e,t){if(b7(t.target))return null;var n=wy(e.event||this.eventName.exposure,t,t.target||t,this.options,this.ignore);if(n.$exposure_type=e.exposureType,this.options.exposure.callback){var r=this.options.exposure.callback(n);return r||uI(r).length?r:n}return n},e.prototype.handleScrollEvent=function(e,t){var n=wy(e.event||this.eventName.scroll,t,t.target||t,this.options,this.ignore);if(n=uM(n,e.params),!this.options.scroll.callback||(n=this.options.scroll.callback(n))||uI(n).length)return n},e}(),w_=function(){function e(e){this.collect=e,this.eventNameList=["report_click_event","report_change_event","report_submit_event","report_exposure_event","report_page_view_event","report_page_statistics_event","report_beat_event"]}return e.prototype.send=function(e,t){var n=t.event;delete t.event,e&&"becon"===e.eventSend?this.collect.beconEvent(n,t):this.collect.event(n,t)},e.prototype.get=function(e,t){fetch(e,uM({headers:{"content-type":"application/json"},method:"GET"},t))},e.prototype.post=function(e,t){fetch(e,uM({headers:{"content-type":"application/json"},method:"POST"},t))},e}(),wb=function(){function e(e,t){this._instance=null,this._intersection=e,this.config=t,this._intersection&&this.init()}return e.prototype.init=function(){var e=this;if(window.MutationObserver)try{if(this._instance=new MutationObserver(function(t){uC(t).call(t,function(t){"attributes"===t.type&&e.attributeChangeObserve(t),"childList"===t.type&&e.modifyNodeObserve(t)})}),!document||!document.body)return;var t=!1!==this.config.autotrack.exposure.attributes;this._instance.observe(document.body,{childList:!0,attributes:t,subtree:!0,attributeOldValue:!1})}catch(e){}},e.prototype.attributeChangeObserve=function(e){e.target.hasAttribute("data-exposure")?this.exposureAdd(e,"mutation"):this.exposureRemove(e)},e.prototype.modifyNodeObserve=function(e){var t=this;uC(Array.prototype).call(e.addedNodes,function(e){var n;1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureAdd(e,"intersect"),t.mapChild(e,yT(n=t.exposureAdd).call(n,t))}),uC(Array.prototype).call(e.removedNodes,function(e){var n;1===e.nodeType&&e.hasAttribute("data-exposure")&&t.exposureRemove(e),t.mapChild(e,yT(n=t.exposureRemove).call(n,t))})},e.prototype.mapChild=function(e,t){var n=this;1===e.nodeType&&e.children.length&&uC(Array.prototype).call(e.children,function(e){1===e.nodeType&&e.hasAttribute("data-exposure")&&t(e),n.mapChild(e,t)})},e.prototype.exposureAdd=function(e,t){try{this._intersection&&this._intersection.exposureAdd(e,t)}catch(e){}},e.prototype.exposureRemove=function(e){try{this._intersection&&this._intersection.exposureRemove(e)}catch(e){}},e._exposure_observer=null,e}();(ww=wg||(wg={}))[ww.EXPOSURE_ONCE=0]="EXPOSURE_ONCE",ww[ww.LIFECYCLE_SHOW_NEW=3]="LIFECYCLE_SHOW_NEW",ww[ww.RESUME_FORM_PAGE=6]="RESUME_FORM_PAGE",ww[ww.RESUME_FORM_BACK=7]="RESUME_FORM_BACK",ww[ww.NOT_EXPOSURE=-1]="NOT_EXPOSURE";var ww,wS,wk=function(){function e(t,n,r){var i=this;this.backStatus=!1,this.instance=this.buildObserver(),this.collect=t,this.observeMap=e._observer_map,n.autotrack.exposure.ratio?this.ratio=n.autotrack.exposure.ratio:0===n.autotrack.exposure.ratio?this.ratio=0:this.ratio=.5,this.timeLimit=n.autotrack.exposure.stay||0,this.exposureType=wg.NOT_EXPOSURE,this.eventHandle=r,this.hashMap=new d7,this.backStatus=!1,this.lastState=null,this.collect.on("re-start-sdk",function(){i.visibilitychange()}),this.addListen()}return e.prototype.buildObserver=function(){var t=this;if(e._observer_instance)return null;if(window.IntersectionObserver){for(var n=[],r=0;r<=1;r+=.01)n.push(r);n.push(1);try{e._observer_instance=new IntersectionObserver(function(e){uC(e).call(e,function(e){var n=e.target.observeId,r=t.observeMap.get(n),i=(e.target,e.isIntersecting,e.intersectionRatio);if(r.intersectionRatio=i,i<=.1&&(e.target.backStatus=!1),t.observeMap.set(n,r),i=t.timeLimit&&!r.exposured&&t.exposureEvent(e,i,n,r)})},{threshold:n})}catch(e){}return e._observer_instance}return null},e.prototype.exposureAdd=function(e,t){var n="mutation"===t?e.target:e,r=n.observeId,i=mp();if(r||this.observeMap.has(r)){var o=this.observeMap.get(r);if(o&&n!==o.instance)this.unobserve(n),this.observeMap.delete(r),n.observeId=i,n.visible=!1,this.observeMap.set(i,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n);else{if(!0===n.visible)return;this.handleBoundingExposure(n)}}else n.observeId=i,n.visible=!1,this.observeMap.set(i,{instance:n.cloneNode(!0),isIntersecting:!1}),this.observe(n)},e.prototype.exposureRemove=function(e){this.observeMap.has(e.observeId)&&(this.observeMap.delete(e.observeId),this.unobserve(e),e.observeId="",e.visible=!1)},e.prototype.exposureEvent=function(e,t,n,r){if(t>=this.ratio){if("0"===e.target.style.opacity||"hidden"===e.target.style.visibility||!0===r.exposured)return;r.startWait&&clearTimeout(r.startWait);var i=e.target.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:i,exposureType:this.getExposureType(e.target)},e),e.target.visible=!0,e.target.hasExposure=!0,r.startTime=l$(),r.exposured=!0}else r.startTime=l$(),r.exposured=!1;this.observeMap.set(n,r)},e.prototype.observe=function(e){this.instance&&this.instance.observe(e)},e.prototype.unobserve=function(e){this.instance&&this.instance.unobserve(e)},e.prototype.getExposureDomToExposure=function(){var e=this;uC(Array.prototype).call(document.querySelectorAll("[data-exposure]"),function(t){e.handleBoundingExposure(t)})},e.prototype.visibilitychange=function(){var e=this,t=null;"visible"===document.visibilityState?this.timeLimit?t=pS(function(){e.getExposureDomToExposure()},this.timeLimit):this.getExposureDomToExposure():(clearTimeout(t),this.customType=void 0)},e.prototype.handleBoundingExposure=function(e){if(this.getBoundingRatio(e)>=this.ratio){e.visible=!0;var t=e.getAttribute&&e.getAttribute("data-exposure-event");this.eventHandle({eventType:"dom",eventName:"exposure",event:t,exposureType:this.customType||wg.RESUME_FORM_BACK},e)}},e.prototype.getBoundingRatio=function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.left,i=t.width,o=t.height,a=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight;return n>=0&&r>=0&&n<=s&&r<=a?(i>a?a:i)*(s-n)/(i*o):0},e.prototype.getExposureType=function(e){return e.visible?!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=wg.RESUME_FORM_PAGE:this.exposureType=wg.LIFECYCLE_SHOW_NEW:(e.hasExposure,!1!==e.backStatus&&(this.backStatus||this.customType||2===window.performance.navigation.type)?this.exposureType=wg.RESUME_FORM_PAGE:this.exposureType=wg.EXPOSURE_ONCE),this.exposureType},e.prototype.addListen=function(){var e,t=this;this.collect.on("set-exposure-type",function(e){t.customType=e});var n,r,i=yT(e=this.visibilitychange).call(e,this);if(r="visibilitychange",(n=document).addEventListener?n.addEventListener(r,i,!1):n.attachEven?n.attachEven("on"+r,i):n["on"+r]=i,window.addEventListener("hashchange",function(e){var n=t.hashMap.get(e.oldURL);n&&location.href===n.prev?(t.backStatus=!0,t.exposureType=wg.RESUME_FORM_PAGE):(t.backStatus=!1,t.hashMap.set(location.href,{current:e.newURL,prev:e.oldURL}))}),this.collect.bridgeReport){var o=window.history.pushState;history.pushState=function(e){for(var n=[],r=1;r=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:h,params:{$direction:l,$offsetY:s,$offsetX:a}},t)):3!==l&&4!==l||f===c&&(a=c-i,Math.abs(a)>=n.distance&&n.distance&&n.eventHandle({eventType:"dom",eventName:"scroll",event:h,params:{$direction:l,$offsetY:s,$offsetX:a}},t)),r=u,i=c},100);var u=e.scrollTop,c=e.scrollLeft,l=wS.NOT_SCROLL;u>r?l=wS.SCROLL_DOWN:ui?l=wS.SCROLL_LEFT:c=0?r:n+r;return i<0||i>=n?void 0:t[i]}});var wQ=i5("Array","at"),wJ=iI.charAt;ta({target:"String",proto:!0,forced:!0},{at:function(e){var t=tZ(Y(this)),n=t.length,r=tp(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:wJ(t,i)}});var w$=i5("String","at"),w0=Array.prototype,w1=String.prototype,w2=d(function(e){var t=e.at;return e===w0||ee(w0,e)&&t===w0.at?wQ:"string"==typeof e||e===w1||ee(w1,e)&&t===w1.at?w$:t});ta({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var w5=Q.Number.isNaN,w4=d(w5);function w3(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;n3&&t[2]&&(n=t[2]),n}function w8(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r0){var o,a,s={vid:r,task_type:1,isV2Player:!0};(null==e||null===(o=e.speedInfo)||void 0===o?void 0:o.type)===wZ.PCDN?(i.pcdnSize+=e.speedInfo.totalByteSize,i.pcdnSpeed=e.speedInfo.currentKBps||0,i.setBandWidth(),i.player.emit("prf_data_size",oJ(oJ({},s),{},{pcdn_size:e.speedInfo.totalByteSize}))):(i.cdnSize+=e.speedInfo.totalByteSize,i.cdnSpeed=e.speedInfo.currentKBps||0,i.setBandWidth(),i.player.emit("prf_data_size",oJ(oJ({},s),{},{cdn_size:e.speedInfo.totalByteSize}))),!i.isAddPreloadDataSize&&(i.cdnSize+=(null===(a=i.player)||void 0===a||null===(a=a.preloadData)||void 0===a?void 0:a.byteLength)||0,i.isAddPreloadDataSize=!0)}}),oX(this,"setBandWidth",function(){var e,t=(null===(e=i.player)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.baseConfig)||void 0===e||null===(e=e.mediaInfo)||void 0===e?void 0:e.id)||"";(function(e,t,n){e.defineProperty&&e.defineProperty(t,{value:n,enumerable:!0,configurable:!0,writable:!0});try{e[t]=n}catch(e){}})(i.player,"bandwidth",{vid:t,cdn:{size:i.cdnSize,speed:i.cdnSpeed},pcdn:{size:i.pcdnSize,speed:i.pcdnSpeed}})}),oX(this,"_onDegrade",function(e){i.changeState("degrade",e)}),oX(this,"_onLoadedMetadata",function(){var e=i._state;e.neeLoadstartDelay&&!e.isLoadstartDelay&&(e.isLoadstartDelay=!0,i.emitLog(wY.LOAD_START,{}))}),oX(this,"_onLoadStart",function(){var e=i._state,t=e.isFFSend;i.startCostTime=w9()-i.newPointTime,i.changeState("loadstart",{isFFSend:t,isLs:e.isLs}),t||(e.isLs||(i.config.loadstartDelay&&!e.isLoadstartDelay?e.neeLoadstartDelay=!0:i.emitLog(wY.LOAD_START,{})),e.isLs=!0,e.isTimeUpdate=!1,e.isFFLoading=!0,i.pt=w9(),i.vt=0,i.fvt=0,i._initOnceEvents())}),oX(this,"_onLoadedData",function(){i.vt=w9();var e=i.vt-i.pt;i.fvt=e>0?e:1,i.loadedCostTime=i.vt-i.newPointTime,i._updateBuffer();var t=i._state,n=t.isTimeUpdate,r=t.isFFSend,o=t.autoplayStart,a=t.isFFLoading;r||i.emitLog(wY.LOADED_DATA,{}),i.changeState("loadeddata",{fvt:i.fvt,isTimeUpdate:n,isFFSend:r,autoplayStart:o,isFFLoading:a}),(n||o)&&i._sendFF("loadedData")}),oX(this,"_onTimeupdate",function(){var e=i._state;e.isTimeUpdate=!0,e.time=i.player.currentTime;var t=i._state,n=t.autoplayStart,r=t.isFFSend,o=t.isFFLoading;i.changeState("timeupdate",{autoplayStart:n,isFFSend:r,isFFLoading:o}),!e.isFFSend&&n?i._sendFF("onTimeupdate"):i.player.off(wB.TIME_UPDATE,i._onTimeupdate)}),oX(this,"_onPlay",function(){var e=i.player.buffered,t=i.levelInfo;t.startBuffer<0&&(t.startBuffer=e.length>0?1e3*e.end(0):0,t.startType="onplay")}),oX(this,"_onAutoplayStart",function(){i._state.autoplayStart=!0;var e=i._state,t=e.isFFLoading,n=e.isFFSend;i.changeState("autoplayStart",{vt:i.vt,isFFLoading:t,isFFSend:n}),i._sendFF("onAutoplayStart")}),oX(this,"_onSeeking",function(){var e=i.seekData,t=i._state;if(!e.startTime){e.startTime=w9(),i.changeState("seeking",{fvt:i.fvt,autoplayStart:i._state.autoplayStart,isFFSend:i._state.isFFSend,isTimeUpdate:i._state.isTimeUpdate,loadStart:i._state.isLs,curTime:i.player.currentTime,startTime:i.seekData.startTime}),e.timeBefore=t.time,e.timeAfter=i.player.currentTime;var n=i.player.bufferedPoint;e.inBuffer=n.end>0?1:0,e.diffStart=n.end>0?1e3*(n.end-i.player.currentTime):0,e.lastTime>0?e.interval=e.startTime-e.lastTime:e.interval=-1,i.suspendWaitingStatus("seek");var r=i._getSeekInfo();i.emitLog(wY.SEEK_START,oJ({start:w9()},r))}}),oX(this,"_onSeeked",function(){i.changeState("seeked",{fvt:i.fvt,autoplayStart:i._state.autoplayStart,isFFSend:i._state.isFFSend,isTimeUpdate:i._state.isTimeUpdate,loadStart:i._state.isLs,curTime:i.player.currentTime,startTime:i.seekData.startTime}),i.suspendSeekingStatus("seeked")}),oX(this,"_onPause",function(){i.endState("pause")}),oX(this,"_onEnded",function(){i.endState("ended")}),oX(this,"_onWaiting",function(){if(i.changeState("onwaiting",{fvt:i.fvt,waiting:i._isWaiting,autoplayStart:i._state.autoplayStart,isFFSend:i._state.isFFSend,isTimeUpdate:i._state.isTimeUpdate,loadStart:i._state.isLs,curTime:i.player.currentTime,startTime:i.seekData.startTime}),!i._isWaiting&&i.vt){i._isWaiting=!0;var e=i.waitData,t=i.seekData;i._state.isTimeUpdate||0!==t.startTime?t.startTime?i._waitType=wM.seekWait:i._waitType=wM.commonWait:i._waitType=wM.startPlayWait,i.player.on(wB.TIME_UPDATE,i._onResumePlay),i.fixedWaitingStart=w9(),e.lastTime>0?e.interval=i.fixedWaitingStart-e.lastTime:e.interval=-1;var n=i.player.bufferedPoint;e.diffStart=n.end>0?1e3*(n.end-i.player.currentTime):0,i._waitTimer=pS(function(){var e=i.waitData;i._isWaiting?(i.waitingStart=w9(),i._waitTimer&&(clearTimeout(i._waitTimer),i._waitTimer=null),e.lastTime=i.fixedWaitingStart,i._startWaitTimeout(),i.emitLog(wY.WAIT_START,{fixedStart:i.fixedWaitingStart,start:i.waitingStart,type:i._waitType,endType:2===i._waitType?"seek":"playing",diffStart:e.diffStart,interval:e.interval})):(e.interval=-1,e.diffStart=0)},200)}}),oX(this,"_onError",function(e){null!=e&&e.player&&delete e.player,i.changeState("error",e),i.suspendSeekingStatus("error"),i.suspendWaitingStatus("error")}),oX(this,"_onWaitingTimeout",function(e){i.suspendWaitingStatus(e||"timeout"),i._waittTimer&&(clearTimeout(i._waittTimer),i._waittTimer=null)}),oX(this,"_onResumePlay",function(){i._isWaiting&&i.suspendWaitingStatus("timeupdate")}),oX(this,"_onPlaying",function(){i._isWaiting&&i.suspendWaitingStatus("playing")}),this.player=t,this._waitType=wM.startPlayWait,this.config=n,this.config.waitTimeout||(this.config.waitTimeout=e.defaultConfig.waitTimeout),this.listens=[{evt:wB.LOAD_START,handle:this._onLoadStart},{evt:wB.LOADED_METADATA,handle:this._onLoadedMetadata},{evt:wB.LOADED_DATA,handle:this._onLoadedData},{evt:wB.SEEKING,handle:this._onSeeking},{evt:wB.SEEKED,handle:this._onSeeked},{evt:wB.PLAYING,handle:this._onPlaying},{evt:wB.CANPLAY,handle:this._onPlaying},{evt:wB.PAUSE,handle:this._onPause},{evt:wB.WAITING,handle:this._onWaiting},{evt:wB.ERROR,handle:this._onError},{evt:wB.ENDED,handle:this._onEnded},{evt:wB.PLAY,handle:this._onPlay},{evt:wB.PAUSE,handle:this._onPause},{evt:wB.AUTOPLAY_STARTED,handle:this._onAutoplayStart},{evt:"degrade",handle:this._onDegrade},{evt:"progress",handle:this._onProgress}],uC(r=this.listens).call(r,function(e){i.player.on(e.evt,e.handle)}),this.onReset()},[{key:"vtype",get:function(){var e;return(null===(e=this.player)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.shared)||void 0===e?void 0:e.vtype)||""}},{key:"destory",value:function(){var e,t=this;this.endState("destroy"),this.player.off(wB.AUTOPLAY_STARTED,this._onAutoplayStart),this.player.off(wB.TIME_UPDATE,this._onTimeupdate),this.player.off(wB.TIME_UPDATE,this._onResumePlay),uC(e=this.listens).call(e,function(e){t.player.off(e.evt,e.handle)})}},{key:"_initOnceEvents",value:function(){this.player&&(this.player.off(wB.TIME_UPDATE,this._onTimeupdate),this.player.on(wB.TIME_UPDATE,this._onTimeupdate))}},{key:"_sendFF",value:function(e){var t=this._state,n=t.isFFLoading,r=t.isFFSend;if(this.vt>0&&n&&!r){var i=this.levelInfo,o=i.buffer,a=i.startBuffer;this._state.isFFLoading=!1,this._state.isFFSend=!0;var s=this.fvt;this.emitLog(wY.FIRST_FRAME,{fvt:this.fvt,costTime:s,vt:this.vt,startCostTime:this.startCostTime,loadedCostTime:this.loadedCostTime,buffer:o,startBuffer:a,endType:e}),this.changeState("sendFF",{fvt:this.fvt,endType:e})}}},{key:"_updateBuffer",value:function(){var e=this.player.currentTime,t=this.player.bufferedPoint,n=t.end>0?t.end-e:0,r=this.levelInfo;r.buffer=1e3*t.end,r.diff=1e3*n}},{key:"_getSeekInfo",value:function(){var e=this.seekData;return{interval:e.interval,timeBefore:e.timeBefore,timeAfter:e.timeAfter,inBuffer:e.inBuffer,diffStart:e.diffStart}}},{key:"_startWaitTimeout",value:function(){this._waittTimer&&clearTimeout(this._waittTimer),this._waittTimer=pS(this._onWaitingTimeout,this.config.waitTimeout)}},{key:"endState",value:function(e){var t=this.player,n=t.currentTime,r=t.duration,i=!(r>0&&n>0&&r-n<1);this.suspendWaitingStatus(e,i),this.suspendSeekingStatus(e,i)}},{key:"suspendSeekingStatus",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.seekData;if(n.startTime){var r=w9(),i=r-n.startTime,o=this.player.bufferedPoint;n.lastTime=n.startTime,n.startTime=0;var a=t?wY.SEEK_END:wN.SEEK_END_EXT,s=this._getSeekInfo();this.emitLog(a,oJ(oJ({end:r,costTime:i,endType:e},s),{},{diffEnd:1e3*o.diff}))}}},{key:"suspendWaitingStatus",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._waitTimer&&(clearTimeout(this._waitTimer),this._waitTimer=null),this._waittTimer&&(clearTimeout(this._waittTimer),this._waittTimer=null),this._isWaiting=!1,this.player.off(wB.TIME_UPDATE,this._onResumePlay),this.waitingStart){var n=this.waitData,r=w9(),i=r-this.waitingStart,o=r-this.fixedWaitingStart,a=this.config.waitTimeout;this.waitingStart=0,this.fixedWaitingStart=0;var s=this.player.currentTime,u=this.player.bufferedPoint,c=u.end>0?u.end-s:0,l=t?wY.WAIT_END:wN.WAIT_END_EXT,f=i>a?a:i;this.changeState("waitingend",{fvt:this.fvt,costTime:f,isFFSend:this._state.isFFSend,autoplayStart:this._state.autoplayStart,isTimeUpdate:this._state.isTimeUpdate,curTime:this.player.currentTime,endType:2===this._waitType?"seek":e,waitType:"loadeddata"===e?1:this._waitType}),this.emitLog(l,{fixedCostTime:o>a?a:o,costTime:i>a?a:i,type:"loadeddata"===e?1:this._waitType,endType:2===this._waitType?"seek":e,diffStart:n.diffStart,diffEnd:1e3*c,interval:n.interval})}}},{key:"emitLog",value:function(e,t){var n=this.player,r=n.media,i=r.readyState,o=r.networkState;this.player.emit(wL,oJ({t:w9(),host:w6(this.player.curretnSrc||this.player.src),vtype:this.vtype,eventType:e,currentTime:n.currentTime,readyState:i,networkState:o},t))}},{key:"changeState",value:function(e,t){t||(t={});var n,r=this.firstFrameState;r&&r.length&&"new"!==e||(this.firstFrameState=[],Sc=l$(),Su=l$());var i=l$(),o="new"===e?0:i-Su,a="new"===e?0:i-Sc;t.vtype=this.vtype,t.vid=(null===(n=this.player)||void 0===n||null===(n=n.config)||void 0===n||null===(n=n.baseConfig)||void 0===n||null===(n=n.mediaInfo)||void 0===n?void 0:n.id)||"",this.firstFrameState.push({state:e,t1:o,t2:a,data:t}),Su=i}}],[{key:"defaultConfig",get:function(){return{waitTimeout:1e4}}}]),Sf=uz(function e(){uE(this,e),oX(this,"_st",0),oX(this,"_acc",0),oX(this,"_loopAcc",0),this.reset()},[{key:"cumulateTime",get:function(){return this._st?(new Date).getTime()-this._st+this._acc:this._acc}},{key:"cumulateTimeIncludeLoop",get:function(){return this._st?(new Date).getTime()-this._st+this._loopAcc:this._loopAcc}},{key:"st",get:function(){return this._st},set:function(e){this._st=e}},{key:"reset",value:function(){this._acc=0,this._st=0,this._loopAcc=0}},{key:"updateAcc",value:function(e){if(this._st){var t=(new Date).getTime()-this._st;this._acc+=t,this._st=0,"ended"===e&&(this._loopAcc=this._acc)}}}]),Sh=[{key:"QQBrowser",reg:/(qqbrowser)\/([\d.]+)/},{key:"QIHU360EE",reg:/qihu 360ee/},{key:"QIHU360SE",reg:/qihu 360se/},{key:"2345Explorer",reg:/(2345explorer)\/([\d.]+)/},{key:"Sogou",reg:/(metasr)/},{key:"Wexin",reg:/(micromessenger)\/([\d.]+)/},{key:"Openlanguage",reg:/(openlanguage)\/([\d.]+)/},{key:"NewsArticle",reg:/(newsarticle)\/([\d.]+)/},{key:"VideoArticle",reg:/(videoarticle)\/([\d.]+)/},{key:"Hotsoon",reg:/(live_stream)_([\d.]+)/},{key:"Aweme",reg:/(aweme)_([\d.]+)/},{key:"Lark",reg:/(lark)\/([\d.]+)/},{key:"PlayStation",reg:/(playstation)/},{key:"BingPreview",reg:/(bingpreview)\/([\d.]+)/},{key:"Baiduspider",reg:/(baiduspider-render)\/([\d.]+)/},{key:"YandexBot",reg:/(yandexbot)\/([\d.]+)/},{key:"Chrome",reg:/(chrome)\/([\d.]+)/},{key:"Safari",reg:/(version)\/([\d.]+)\s*(safari)/}],Sd=[{key:"Trident",reg:/(rv:)([\d.]+)/},{key:"Trident",reg:/(msie)\s*([\d.]+)/}],Sp=["avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","avc1.42E01E","mp4v.20.8","avc1.42E01E, mp4a.40.2","avc1.58A01E, mp4a.40.2","avc1.4D401E, mp4a.40.2","avc1.64001E, mp4a.40.2","mp4v.20.8, mp4a.40.2","mp4v.20.240, mp4a.40.2"],Sv="undefined"!=typeof navigator?null===(Sa=navigator.userAgent.match(/Chrome\/([0-9.]+)/))||void 0===Sa?void 0:Sa[1]:"",Sg=hl((null==Sv||null===(Ss=Sv.split("."))||void 0===Ss?void 0:Ss[0])||"0",10)||0,Sy=["Baiduspider","YandexBot"],Sm=["Baiduspider","googlebot","360Spider","haosouspider","YoudaoBot","Sogou News Spider","Yisouspider","Googlebot","Headless","Applebot","Bingbot","PetalBot"],S_="undefined"!=typeof navigator&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";e=e.toLocaleLowerCase();var t=/(iphone)/.test(e)||/(ipad)/.test(e),n=/(android)/.test(e),r=/(windows phone)/.test(e),i=t||n||r,o={isIOS:t,isAndroid:n,isMobile:i,isPC:!i,isPad:/(ipad)/.test(e)},a=function(){var e={isSupport:!1,mime:""};if("undefined"==typeof document)return e;var t=document.createElement("video");return"function"==typeof t.canPlayType?lD(Sp).call(Sp,function(n){"probably"===t.canPlayType('video/mp4; codecs="'.concat(n,'"'))&&(e.isSupport=!0,e.mime+="||".concat(n))}):t=null,e}();o.isSupportMP4=a.isSupport,o.mime=a.mime;var s="",u=0,c=[],l=Sh;/trident/.test(e)&&(l=Sd);for(var f=0;f2?c[2]:"";break}return s?(o["is".concat(s)]=!0,o.name=s,o.appVersion=u):function(){var e=navigator.mimeTypes;if(e){for(var t,n,r,i=0;i-1||e[i].type&&h6(n=e[i].type).call(n,"application/vnd.chromium.remoting-viewer")>-1||e[i].description&&h6(r=e[i].description).call(r,"360")>-1)return!0}return!1}()&&(o.name="360EE"),o.name&&"Trident"!==o.name&&/(trident)/.exec(e)&&(o.name=o.name?"".concat(o.name,"_Trident"):"Trident"),o.isSpider=function(e,t){var n=!1;lD(Sy).call(Sy,function(t){t===e&&(n=!0)});for(var r=0;r0&&e.end(t-1)+1>i.player.duration&&(i.bft=w7())}}),oX(this,"onPlayerInited",function(){w8("player init"),i._playerCreatedTime=w7(),i.playlogs&&(i.playlogs.rt=w7())}),oX(this,"onNotAutoPlay",function(){w8("onNotAutoPlay","autoplay:".concat(i.isAutoplay)),0===i.isAutoplay?i.isAutoplay=2:1===i.isAutoplay&&(i.isAutoplay=3)}),oX(this,"onLoggerCache",function(e){var t;i._templog={vtype:(null===(t=i.shareConfig)||void 0===t?void 0:t.vtype)||"",log:"string"==typeof e?e:null==e?void 0:e.log},i.onOneTemp(wq.LOGGER_CACHE)}),oX(this,"onDropFrames",function(e){i._dropFrames+=(null==e?void 0:e.dropFrames)||0}),oX(this,"onPlayerError",function(e){e=e||{};var t=i.errorLog;if(w8("onPlayerError",e),i.load_state=wG,i._endType="error",t&&(t.errc=e.code,t.message=e.message,t.ext=e.ext,t.accu_errc+=1),(t||e)&&(S_.isPC&&!S_.isSupportMP4||S_.isSpider))return i.onOneError({code:(null==t?void 0:t.errc)||e.code,url:e.url,headers:e.headers||{},message:e.message||""},0),void(i._isOnePlayReport=!0);t&&(t.errc=e.code,t.message=e.message||"",t.ext=e.ext,t.last_errors.push(t.errc),0===t.fir_errc&&(t.fir_errc=t.errc)),i.sendSwitchOpera(wV.ERROR.toString()),i.onOnePlay(wV.ERROR),i.onOneTemp(wV.ERROR),i.onOneError({endState:wV.PLAY_ERROR,code:null==t?void 0:t.errc,url:e.url,headers:e.headers||{},message:e.message||""},0),i.sendEventsQueue()}),oX(this,"waitEndHandle",function(e,t){var n,r,o=i.playlogs,a=i.resLogs,s=i.stall,u=e.endType,c=e.costTime,l=e.type;(e.costTime>=i._options.longWait||1===l)&&i.reportPlayerLog(wq.WAIT_END+l),w8(ll(n=ll(r="onXgLogWaiting>>".concat(u,"|costTime:")).call(r,c," vt:")).call(n,null==o?void 0:o.vt)),i.appendStallInfo("end",w9(),u),o&&(o.bc++,o.bu_acu_t+=c),!i.checkInBuffer(i.player.currentTime)&&o&&(o.nbc++,o.nbu_acu_t+=c),a&&(a.bc++,a.bu_acu_t+=c),s&&(s.end=i.cur_play_pos,s.cost=c,s.acc+=s.cost,1===s.sc&&(s.endf=i.cur_play_pos)),i.onOneEvent({type:l,costTime:c,end_type:e.eventType},t,2)}),oX(this,"onVodLog",function(e){w8("onVodlog",e);var t=e.costTime,n=e.start,r={speed:u5(i.netLog)};if(e.eventType===wY.WAIT_START)return i.onOneEvent({costTime:t,end_type:e.eventType},r,2),void i.appendStallInfo("start",n);e.eventType===wY.WAIT_END?i.waitEndHandle(e,r):e.eventType===wY.FIRST_FRAME&&(i.fvt=e.fvt,i.player&&i.player._startTimelines&&(i.player._startTimelines.firstframedp=!0))}),oX(this,"onSeeking",function(){i.isSeeking||i.accWatchTime.updateAcc("seeking"),i.isSeeking=!0;var e=i.seekLog;e&&(e.lastSeekStartTime=w9(),e.sc+=1,e.seekBefore=i.lastVideoTime,e.buf_include=i.checkInBuffer(i.player.currentTime)?1:0),w8("onSeeking","currentTime:".concat(i.player.currentTime)),0===i.startStep&&i.setPt()}),oX(this,"onSeeked",function(){i.isSeeking&&i.suspendSeekStatus(wY.SEEK_END,!0)}),oX(this,"onPlaying",function(){i.load_state=wF;var e=w9();i.pauseLog&&i.pauseLog.isPausing&&(i.pauseLog.isPausing=!1,i.pauseLog.pause_acu_t+=e-i.pauseLog.pause_start);var t=i.player,n=t.paused,r=t.ended;i.accWatchTime.st||n||r||(i.accWatchTime.st=w7())}),oX(this,"onFirstFrame",function(e){i.fvtObject=(null==e?void 0:e.fvt)||{}}),oX(this,"onReplay",function(){i.playlogs&&(i.playlogs.lc+=1)}),oX(this,"onPlay",function(){var e;w8("onPlay",ll(e="this.startStep :".concat(i.startStep," this.isEnded:")).call(e,i.isEnded)),i.isEnded&&(i.resetPlayLogs(),i.setPt())}),oX(this,"onPause",function(){w8("onPause"),i.accWatchTime.updateAcc("pause");var e=i.pauseLog;e&&(e.isPausing=!0,e.pause_start=w9())}),oX(this,"onWaiting",function(){i.accWatchTime.updateAcc("waiting"),i.updateCurBuffer()}),oX(this,"onError",function(){i.accWatchTime.updateAcc("error"),i._error=!0}),oX(this,"onEnded",function(){var e,t;i.initial_url&&(i.accWatchTime.updateAcc("ended"),w8("onEnded",ll(e=ll(t="watchDur:".concat(i.watchDur," vt:")).call(t,i.vt," pt:")).call(e,i.pt)),i.isEnded=!0,i.sendSwitchOpera(wV.ENDED),i.onOnePlay(wV.ENDED),i.onOneTemp(wV.ENDED),i.sendEventsQueue())}),oX(this,"onUnload",function(){0!==i.startStep&&i.initial_url&&(i.onOneTemp(wV.UNLOAD.toString()),i._reportInvalidVV(wV.UNLOAD)||(i.sendSwitchOpera(wV.UNLOAD.toString()),i.onOnePlay(wV.UNLOAD,!0)))}),oX(this,"onVisibilitychange",function(){var e,t=null===(e=i.playlogs)||void 0===e?void 0:e.vt;"visible"===document.visibilityState&&(t||i.setPt())}),oX(this,"onDestroy",uk(uw().mark(function e(){var t,n,r,o,a,s,u,c,l,f;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:w8(ll(t=ll(n="onDestroy:this.startStep:".concat(i.startStep," initial_url:")).call(n,i.initial_url," ")).call(t,!!i.initial_url)),0===i.fvt&&i.player&&(c=(u=null===(a=i.player)||void 0===a||null===(a=a._core)||void 0===a||null===(a=a.startTimelines)||void 0===a?void 0:a.playerstate)?u5(u):"",f=(l=null===(s=i._logEvent)||void 0===s?void 0:s.firstFrameState)?u5(l):"",i._templog={log:c+"||"+f},i.onOneTemp(wq.DESTROY.toString())),i.accWatchTime.updateAcc("destroy"),i.onOnePlay(wV.DESTROY),i.startStep>0&&i.initial_url&&i.onOneTemp(wV.DESTROY.toString()),i.sendSwitchOpera(wV.ENDED.toString()),i.sendEventsQueue(),S_.isPC?window.removeEventListener("beforeunload",i.onUnload):(S_.isMobile||S_.isPad)&&window.removeEventListener("pagehide",i.onUnload),document.removeEventListener("visibilitychange",i.onVisibilitychange),uC(r=i.listeners).call(r,function(e){i.player.off(e.evt,e.handler)}),i.clearTimers(),null===(o=i._logEvent)||void 0===o||o.destory();case 1:case"end":return e.stop()}},e)}))),oX(this,"onOnePlay",function(){var e,t,n,r,o,a,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(w8(ll(e=ll(t="onOnePlay _isOnePlayReport:".concat(i._isOnePlayReport," isLeave: ")).call(t,u," endState:")).call(e,s)),!i._isOnePlayReport){var c=i.errorLog,l=i.playlogs,f=i.abrInfo,h=i.resLogs,d=i.player,p=i.pauseLog,v=i.stall,g=i.netLog,y=i.watchDur;i._isOnePlayReport=!0;var m=w7(),_=i.getFrameInfo(),b=u5(null===(n=i.player)||void 0===n||null===(n=n._core)||void 0===n||null===(n=n.startTimelines)||void 0===n?void 0:n.playerstate)+"\nLoggerState:"+u5(null===(r=i._logEvent)||void 0===r?void 0:r.firstFrameState),w=i.getPerformance(),S=null==c?void 0:c.errc,k=(null===(o=i.seekLog)||void 0===o?void 0:o.sc)||0,E=(null===(a=i.seekLog)||void 0===a?void 0:a.sat)||0,T={bc:Si(y,i.bc||0),bu_acu_t:Si(y,i.bu_acu_t||0),sc:Si(y,k),sat:Si(y,E)};i.setExt();var z=i._getCompatibilityInfo();i.setNovv(null,s.toString());var A=lD(g).call(g,function(e){return null==e?void 0:e.averageKBps}),C=lD(g).call(g,function(e){return null==e?void 0:e.currentKBps}),I=oJ(oJ(oJ({local_time:w7(),log_type:"video_play",plugin_exception:0,player_create_exception:"",v:i.vid,initial_url:i.initial_url,initial_host:w6(i.initial_url),initial_ip:0,initial_type:i.vtype,initial_resolution:null==h?void 0:h.initial_resolution,final_resolution:null==h?void 0:h.final_resolution,pt:i.pt,prepare_start_time:null==l?void 0:l.nt,prepare_end_time:(null==l?void 0:l.rt)||w7(),vt:i.vt,lt:i.lt,lpt:i.lpt,fvt:i.fvt,nvt:i.nvt,bft:i.bft,sc:k,sat:E,bc:i.bc,nbc:(null==l?void 0:l.nbc)||0,video_net_s:i.videoNetworkState,status:i.curStatus,first_buf_startt:null==v?void 0:v.startf,first_buf_endt:null==v?void 0:v.endf,lc:null==l?void 0:l.lc,bu_acu_t:i.bu_acu_t,nbu_acu_t:(null==l?void 0:l.nbu_acu_t)||0,pause_acu_t:null==p?void 0:p.pause_acu_t,cur_play_pos:i.cur_play_pos,load_state:i.load_state,play_speed:i.playbackRate,playback_state:i.playback_state,end_state:s,watch_dur:y,switch_resolution_c:i.switchResolutionCount,is_start_play_automatically:i.isAutoplay,start_time:i.start_time,finish:i.finish,errc:S,vsc_message:null==c?void 0:c.message,width:i.videoWidth,height:i.videoHeight,vd:i.vd,df:i.curDefinition,bitrate:i.curBitrate,lf:null==h?void 0:h.lf,play_c:0,player_created_t:i.player_created_t,fir_errt:null==c?void 0:c.fir_errt,fir_errc:null==c?void 0:c.fir_errc,lv_method:0,ldst:null==h?void 0:h.ldst,ldet:null==h?void 0:h.ldet,is_disable_short_seek:0,mute:i.mute,volume:i.volume,download_speed:C.toString(),avg_speed:A.toString(),preload_hit:i.preloadHit,preload_cached:i.preloadDur,mdl_req_num:-1,watingcost:i.watingCost,try_err_c:null==c?void 0:c.try_err_c,accu_errc:null==c?void 0:c.accu_errc,merror:b,ex:Sr(i.exInfo),perf:Sr(w),bufs:Sr(i.allBuffer),pcdn:Sr(i.getPCDNStat())},i.curBuffer),{},{degrade:null==l?void 0:l.degrade,cache_file:i._cacheFile},_),{},{fullScreen:i._getFullScreenType(),encryptedInfo:Sr(i.encryptedInfo),per100_info:Sr(T)},z);0!==i.vt&&(I.et=m),0===i.fvt&&i.reportPlayerLog(wq.NO_STARTPLAY),null!=d&&d.softDecoder&&(I.soft_decoder=d.softDecoder),d&&d.dashState&&(I.dash_state=d.dashState),null!=d&&d.softDecoder&&(I.soft_decoder=d.softDecoder),f.abr_init_opts=i.shareConfig.autoBitrateOpts||{},I.abr_info=Sr(i.abrInfo);var x=z.is_support_mp4&&z.is_support_mse_mp4;if(z.is_spider||S_.isPC&&!x&&0===i.fvt)w8("is_spider",z.is_spider,"is_support_mp4",z.is_support_mp4);else if(u){var R,D=!(null!==(R=i._options)&&void 0!==R&&R.disableLocalCache);i.reportLog(wO.ONE_PLAY,I,D?1:0)}else i.reportLog(wO.ONE_PLAY,I)}}),oX(this,"onOneEvent",function(e){var t,n,r,o,a=e.type,s=e.costTime,u=e.vid,c=e.end_type,l=e.host,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},h=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;w8("onOneEvent",c),l=l||w6(i.player.src);var d=i.curBuffer,p=i.allBuffer,v=i.getFrameInfo(),g=oJ(oJ({local_time:w7(),v:u||i.vid,cost_time:s,type:a,end_type:c||i.end_type,cdn_url:i.url,cdn_host:l||"",initial_type:i.vtype,resolution:i.curBitrate,play_speed:i.playbackRate,first_frame_interval:w7()-i.pt,last_switch_interval:i.getLastInterval("lastSwitchStartTime",i.resLogs,!1),last_seek_interval:i.updateSeekPt(!1),last_event_interval:i.getLastInterval("lastEventTime"),cur_play_pos:i.cur_play_pos,video_ready_s:i.videoReadyState,video_seeking:i.videoSeeking,video_paused:i.videoPaused,bufs:Sr(p),retry_count:i._retryCount,at:null==(t=i.playlogs)?void 0:w2(t),stay_seconds:hl(((w7()-((null==(n=i.playlogs)?void 0:w2(n))||0))/1e3).toString(),10),preload_hit:i.preloadHit,preload_cached:i.preloadDur},d),v),y=i.player,m=y.currentTime,_=y.duration,b=_>0?_-m:Number.MAX_VALUE;if(c===wY.WAIT_START&&b<=1){var w=g.local_time,S=g.v,k=g.cost_time,E=g.cdn_url,T=g.first_frame_interval,z=g.cur_play_pos,A=g.video_ready_s,C=g.video_seeking,I=g.video_paused,x=g.bufs,R=g.bc,D=g.preload_hit;i.reportLog(wO.ONE_EVENT,oJ({end_type:"endlongwait",local_time:w,v:S,cost_time:k,cdn_url:E,first_frame_interval:T,cur_play_pos:z,video_ready_s:A,video_seeking:C,video_paused:I,bufs:x,bc:R,preload_hit:D},d),h)}if(c===wY.WAIT_START&&"function"==typeof(null===(r=i._options)||void 0===r?void 0:r.getPageFPS)){var P=i._options.getPageFPS();g.cur_fps=P.curFPS||0,g.avg_fps=P.avgFPS||0}h6(c).call(c,"timeout")>-1&&g.cost_time>36e5&&(g.cost_time=36e5),uC(o=uI(f)).call(o,function(e){g[e]=f[e]}),g.ex=Sr(i.getPlayerExt()),i.addIfExist("drm_type",i._options,g),i.reportLog(wO.ONE_EVENT,g,h)}),oX(this,"onOneTemp",function(e){var t;if(w8("onOneTemp>>",!i._templog,e),i._templog){var n=i.player,r=i.playlogs,o=i.pauseLog,a=i.errorLog,s=i.resLogs,u=i.watchDur,c=oJ(oJ(oJ({local_time:w7()},i._templog),{},{end_type:e,v:i.vid,initial_type:i.vtype,pt:i.pt,vt:i.vt,lt:i.lt,fvt:i.fvt,bc:i.bc,bu_acu_t:(i.bu_acu_t||0)>864e5?0:i.bu_acu_t,pause_acu_t:null==o?void 0:o.pause_acu_t,cur_play_pos:i.cur_play_pos,watch_dur:u>864e5?0:u,finish:i.finish,errc:null==a?void 0:a.errc,vd:i.vd,df:i.curBitrate,lf:null==s?void 0:s.lf,try_err_c:null==a?void 0:a.try_err_c,accu_errc:null==a?void 0:a.accu_errc,dash_break:2===n.dashBufferBreak?1:0,bufs:Sr(i.allBuffer)},i.curBuffer),{},{degrade:null==r?void 0:r.degrade});0!==i.vt&&(c.et=w7()),uC(t=["drm_type","dynamic_type"]).call(t,function(e){i.addIfExist(e,i._options,c)}),i.reportLog(wO.ONE_TEMP,c,0),i._templog=null}}),this.player=t,this._options=e.defaultConfig(),void 0===this.player||null===this.player)throw Error("player is ".concat(this.player));this.bindEvt(),this._logEvent=new Sl(this.player,{waitTimeout:n.waitTimeout,loadstartDelay:"mp4"===this.baseConfig.protocol&&n.loadstartDelay}),n&&n.line_app_id&&(this.eventQueue=[],lD(r=uI(n)).call(r,function(e){void 0!==n[e]&&null!==n[e]&&(i._options[e]=n[e])}),this._envInfo=n.envInfo||{},this.line_app_id=hl(n.line_app_id,10)||0,this.line_user_id=(n.line_user_id||"").toString(),this.playerVersion=this.player.version,this.closeSeekLog=n.closeSeekLog||!1,this.initializeTracker(),this.reset())}return uz(e,[{key:"codecType",get:function(){var e;return(null===(e=this.shareConfig)||void 0===e?void 0:e.codecType)||""}},{key:"bc",get:function(){var e;return(null===(e=this.playlogs)||void 0===e?void 0:e.bc)||0}},{key:"cumulateTime",get:function(){var e;return(null===(e=this.accWatchTime)||void 0===e?void 0:e.cumulateTime)||0}},{key:"url",get:function(){return u5(this.baseConfig.urlList)||this.baseConfig.url}},{key:"vid",get:function(){var e;return(null===(e=this.mediaInfo)||void 0===e?void 0:e.id)||""}},{key:"preloadHit",get:function(){var e;return(null===(e=this.player)||void 0===e||null===(e=e.preloadData)||void 0===e?void 0:e.byteLength)>0?1:0}},{key:"preloadDur",get:function(){var e;return 1e3*((null===(e=this.player)||void 0===e||null===(e=e.preloadData)||void 0===e?void 0:e.duration)||0)}},{key:"bu_acu_t",get:function(){var e;return this.playlogs&&this.playlogs.bu_acu_t>864e5?0:null===(e=this.playlogs)||void 0===e?void 0:e.bu_acu_t}},{key:"pt",get:function(){var e;return(null===(e=this.playlogs)||void 0===e?void 0:e.pt)||w7()}},{key:"vt",get:function(){var e;return null===(e=this.playlogs)||void 0===e?void 0:e.vt}},{key:"nvt",get:function(){var e,t,n=(null===(e=this.playlogs)||void 0===e?void 0:e.vt)||0,r=(null===(t=this.playlogs)||void 0===t?void 0:t.nt)||0;return n>0&&r>0?hl((n-r).toString(),10):0}},{key:"videoFrameInfo",get:function(){var e={total:0,dropped:0,corrupted:0,droppedRate:0,droppedDuration:0},t=this.player.media;if(!t||!t.getVideoPlaybackQuality)return e;var n=t.getVideoPlaybackQuality(),r=(null==n?void 0:n.droppedVideoFrames)||0;return Sg<140&&r>=1&&(r-=1),e.dropped=r,e.total=n.totalVideoFrames+this._dropFrames||0,e.corrupted=n.corruptedVideoFrames||0,e.total>0&&(e.droppedRate=e.dropped/e.total*100,e.droppedDuration=hl((this.watchDur/e.total*e.dropped).toString(),0)),e}},{key:"baseConfig",get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.config.baseConfig)||{}}},{key:"mediaInfo",get:function(){var e;return(null===(e=this.baseConfig)||void 0===e?void 0:e.mediaInfo)||{}}},{key:"shareConfig",get:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.config.shared)||{}}},{key:"vd",get:function(){var e,t,n,r=this.player;return r.duration&&"number"==typeof r.duration&&r.duration>0?hl((1e3*r.duration).toString(),10):null!==(e=this.mediaInfo)&&void 0!==e&&e.duration&&"number"==typeof(null===(t=this.mediaInfo)||void 0===t?void 0:t.duration)&&this.mediaInfo.duration>0?hl((1e3*(null===(n=this.mediaInfo)||void 0===n?void 0:n.duration)).toString(),10):0}},{key:"cur_play_pos",get:function(){return hl((1e3*this.player.currentTime).toString(),10)}},{key:"volume",get:function(){return this.player.volume}},{key:"watingCost",get:function(){if(this.inWaitingStart>0){var e=w9()-this.inWaitingStart;return e>36e5?0:e}return 0}},{key:"videoNetworkState",get:function(){var e=this.player;return e&&e.video?e.video.networkState:-1}},{key:"vtype",get:function(){var e;return(null===(e=this.shareConfig)||void 0===e?void 0:e.vtype)||""}},{key:"dynamicType",get:function(){return""}},{key:"buffer_time",get:function(){if(!this.player)return 0;var e=0;try{var t=this.player.bufferedPoint;e=t[1]-t[0]}catch(t){e=0}return e}},{key:"player_created_t",get:function(){return this._playerCreatedTime}},{key:"playbackRate",get:function(){return this.player.playbackRate}},{key:"mute",get:function(){return this.player.muted?0:1}},{key:"videoWidth",get:function(){var e=this.player;return e&&e.video?e.video.videoWidth:0}},{key:"videoHeight",get:function(){var e=this.player;return e&&e.video?e.video.videoHeight:0}},{key:"initial_url",get:function(){return this.player.src}},{key:"curSrc_host",get:function(){return w6(this.player.src)}},{key:"curStatus",get:function(){return 0}},{key:"play_type",get:function(){return 0}},{key:"sessionId",get:function(){return this._sessionId}},{key:"finish",get:function(){return this.isEnded?1:0}},{key:"end_type",get:function(){return this._endType}},{key:"avgSpeed",get:function(){var e;return(null===(e=this.player)||void 0===e||null===(e=e.speedInfo)||void 0===e?void 0:e.averageKBps)||0}},{key:"realSpeed",get:function(){var e;return(null===(e=this.player)||void 0===e||null===(e=e.speedInfo)||void 0===e?void 0:e.currentKBps)||0}},{key:"preLoadData",get:function(){var e,t,n;return this.player?{hit:(null===(e=this.player)||void 0===e||null===(e=e.preloadData)||void 0===e?void 0:e.byteLength)>0?1:0,duration:1e3*((null===(t=this.player)||void 0===t||null===(t=t.preloadData)||void 0===t?void 0:t.duration)||0),length:(null===(n=this.player)||void 0===n||null===(n=n.preloadData)||void 0===n?void 0:n.byteLength)||0}:{}}},{key:"curDefinition",get:function(){var e,t=null===(e=this.player)||void 0===e?void 0:e.curDefinition;return"".concat((null==t?void 0:t.definition)||-1)}},{key:"curBitrate",get:function(){var e,t=null===(e=this.player)||void 0===e?void 0:e.curDefinition;return(null==t?void 0:t.bitrate)||0}},{key:"videoReadyState",get:function(){var e=this.player;return e&&e.video?e.video.readyState:-1}},{key:"videoSeeking",get:function(){var e=this.player;return e&&e.video&&e.video.seeking?1:0}},{key:"videoPaused",get:function(){var e=this.player;return e&&e.video&&e.video.paused?1:0}},{key:"switchResolutionCount",get:function(){var e;return null===(e=this.resLogs)||void 0===e?void 0:e.switch_count}},{key:"isError",get:function(){return this._error||this.player.video.error}},{key:"isStop",get:function(){return this.isEnded||!1}},{key:"isPause",get:function(){return this.player.video.paused||!1}},{key:"lt",get:function(){var e=0;return 0===this.vt&&(e=w7()),e}},{key:"lpt",get:function(){return this.lt?this.lt-this.pt:0}},{key:"playback_state",get:function(){return this._error?wU.ERROR:this.isStop?wU.STOP:this.player.paused?wU.PAUSE:wU.PLAYING}},{key:"watchDur",get:function(){var e=this.player,t=this.playlogs,n=e.cumulateTime?e.cumulateTime:w3(null==t?void 0:t.played);return n>=0?n>864e5?864e5:n:0}},{key:"encryptedInfo",get:function(){return this.player.encryptedInfo||{encryptedType:0}}},{key:"allBuffer",get:function(){return this.buffers.allBuffer}},{key:"curBuffer",get:function(){return this.buffers.curBuffer}},{key:"levelInfo",get:function(){var e;return(null===(e=this._logEvent)||void 0===e?void 0:e.levelInfo)||{}}},{key:"envInfo",get:function(){return this._envInfo},set:function(e){e&&(this._envInfo=e)}},{key:"resetStartTime",value:function(){var e;this.start_time=(null===(e=this.baseConfig)||void 0===e?void 0:e.startTime)||0}},{key:"reset",value:function(){var e;try{this.sendLocalLog(),this.resetLoggerParams(),w8("logger reset:".concat(this.player.video))}catch(e){}this.fvt=0,this._dropFrames=0,null===(e=this._logEvent)||void 0===e||e.onReset()}},{key:"getPluginsConfig",value:function(){var e;return(null===(e=this.player)||void 0===e?void 0:e.config.preset.pluginsConfig.vodLogger)||{}}},{key:"resetPlayLogs",value:function(){var e=this.playlogs?this.playlogs.lc:0;this.playlogs={nt:w7(),vt:0,rt:this.isEnded?w7():0,at:0,pt:0,bu_acu_t:0,bc:0,nbc:0,nbu_acu_t:0,played:[{begin:0,end:-1}],degrade:"none",lc:e}}},{key:"resetBuffers",value:function(){this.buffers={allBuffer:[],curBuffer:{buf_diff:0,buf_s_pos:0,buf_e_pos:0,buf_include:0}}}},{key:"reportPlayerLog",value:function(e){var t,n=this;this.player&&(null===(t=this.player)||void 0===t||null===(t=t.getLog())||void 0===t||t.then(function(t){n._templog={log:t},n.onOneTemp(e)}))}},{key:"resetNetLog",value:function(){this.netLog=[]}},{key:"resetNovv",value:function(){this._novv={errc:0,errorMessage:"",end_state:"",novv_pt:0,novv_lpt:0,vtype:"",log_pt:w7()}}},{key:"resetLoggerParams",value:function(){w8("resetLoggerParams"),this.accWatchTime.reset(),this.resetPlayLogs(),this.resetBuffers(),this.resetNetLog(),this.resetNovv(),this.exInfo={stall:[]},this._templog=null,this._isOnePlayReport=!1,this.startStep=0,this.bft=0,this.initializeLogDatas(),this.initializeUrlLog()}},{key:"setNovv",value:function(e,t){!this._novv||this.fvt>0||(e&&(this._novv.errc=e.code,this._novv.errorMessage=e.message),this._novv.end_state=t,this._novv.novv_pt||(this._novv.novv_pt=w7(),this._novv.novv_lpt=w7()-this._novv.log_pt),this.player&&(this._novv.vtype=this.shareConfig.vtype,this.player.novv=this._novv))}},{key:"initializeLogDatas",value:function(){this.startStep=0,this.inWaitingStart=0,this.waitStartTime=0,this.lastVideoTime=0,this._endType="",this._retryCount=0,this.lastOperaTime=-1,this.lastEventTime=-1,this.stallIntervalId=null,this.resetSeekLog(),this.resetResolutionLog(),this.resetErrorLog(),this.pauseLog={pause_acu_t:0,isPausing:!1,pause_start:0},this.resetStall(),this._playerCreatedTime=0,this.load_state=wj,this.lv_method=6,this.isSeeking=!1,this.isEnded=!1,this.startStep=0,this.resetAbrInfo(),this._cacheFile=wH}},{key:"resetSeekLog",value:function(){this.seekLog={intervalId:0,lastSeekStartTime:w9(),seekBefore:0,sat:0,sc:0,buf_include:0}}},{key:"resetResolutionLog",value:function(){this.resLogs={lastSwitchStartTime:-1,switch_count:0,abr_switch_count:0,initial_resolution:"",final_resolution:"",ldst:0,ldet:0,df:"",lf:"",played:[],bc:0,bu_acu_t:0,sc:0,sat:0,bitrate:0,vs:0}}},{key:"resetErrorLog",value:function(){this.errorLog={accu_errc:0,try_err_c:0,errc:0,fir_errc:0,fir_errt:0,last_errors:[],message:"",ext:{}}}},{key:"resetStall",value:function(){this.stall={sc:0,startf:0,endf:0,start:0,end:0,cost:0,acc:0}}},{key:"resetAbrInfo",value:function(){this.abrInfo={abr_general_info:{},abr_event_info:{video_switch:[],video_stall:[],video_exit:{}},abr_play_info:{start_play_time_ms:0,is_hint:0,playback_info:{internet_speed_record:[],play_bitrate_record:[],buffer_length_record:[],play_speed_record:[]}},abr_user_info:{cancel_abr:0},abr_init_opts:this.player.config.autoBitrateOpts||{}}}},{key:"initSessionId",value:function(){var e="0";try{var t=window.localStorage.getItem(SD);e=(t?JSON.parse(t):{}).web_id||"0"}catch(t){e="0"}this._sessionId=function(e){var t=(new Date).getTime(),n=0;try{n=hl(e)}catch(e){n=0}return t+=n,window.performance&&"function"==typeof window.performance.now&&(t+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)})}(e),w8("sessionId ".concat(this._sessionId))}},{key:"initializeTracker",value:function(){var e=this,t=this._options;if(window.__vod_log__)this.tracker=window.__vod_log__;else{this.tracker=window.__vod_log__=new SP("tracker");var n=(null==t?void 0:t.channel)||"cn",r={app_id:"cn"===(n="va"===n||"sg"===n?n:"cn")?SR:1300===SR?323254:SR,channel:n,log:!1,disable_sdk_monitor:!0,channel_domain:"",enable_ab_test:!1};null!=t&&t.channelDomain&&(r.channel_domain=t.channelDomain),r.enable_ab_test=!(null==t||!t.enableAbTest),this.tracker.init(r)}this.initSessionId();var i=navigator?navigator.hardwareConcurrency:0,o=navigator?navigator.deviceMemory:0;this.commonParams={play_type:0,source_type:"vid",sdk_version:SA,pc:this.player.version,line_app_id:this.line_app_id,line_user_id:this.line_user_id,app_version:(null==t?void 0:t.appVersion)||"",platform:S_.isPad?"pad":S_.isMobile?"mobile":"pc",cpu_core:Number(i)||0,memory_size:Number(o)||0,support:SS(),webdriver:navigator&&navigator.webdriver?1:0,player_sessionid:this.sessionId,web_url:window.location.href,user_agent:navigator.userAgent,core_type:"webcodec",browser_plugins:function(){try{if("undefined"==typeof navigator||!navigator.plugins)return"";for(var e=[],t=navigator.plugins.length,n=["chromium","internal","native client","pdf"],r=0;r0?u5(e):""}catch(e){return""}}()};var a=(null==t?void 0:t.trackerConfig)||{};w8("commonParams ",this.commonParams,a);var s,u=oJ({evtParams:this.commonParams,disable_auto_pv:!0},a);!S_.name||S_.isChrome||S_.isSafari||(u.browser=S_.name,S_.appVersion&&(u.browser_version=S_.appVersion)),this.line_user_id&&(u.user_unique_id=this.line_user_id,null!=t&&t.enableTeaWebId||(u.web_id=this.line_user_id)),null!=t&&t.referrer&&(u.referrer=t.referrer,u.referrer_host=w6(t.referrer)),null!=t&&t.ext&&lD(s=uI(t.ext)).call(s,function(n){e.exInfo[n]=t.ext[n]}),w8("trackConfig",u),this.tracker.config(u),this.tracker.start()}},{key:"resetDefiInfo",value:function(){var e=this.resLogs;e&&(e.played=[],e.bc=0,e.bu_acu_t=0,e.sc=0,e.sat=0,e.vs=0)}},{key:"sendLocalLog",value:function(){var e=this,t=Sz.get();Sz.remove(),lD(t).call(t,function(t){var n;lD(n=uI(t)).call(n,function(n){if(w8("sendLocalLog",n,t[n]),e.player){e.player.emit("abLog",n,t[n]);var r,i=null===(r=e._options)||void 0===r?void 0:r.sendLocalCallback;i&&"function"==typeof i&&i(n,t[n])}e._track(n,t[n])})})}},{key:"_track",value:function(e,t){"function"==typeof this.tracker?this.tracker(e,t):this.tracker.event(e,t)}},{key:"bindEvt",value:function(){var e,t=this;this.listeners=[{evt:"play",handler:this.onPlay},{evt:"playing",handler:this.onPlaying},{evt:"first_frame",handler:this.onFirstFrame},{evt:"pause",handler:this.onPause},{evt:"waiting",handler:this.onWaiting},{evt:"ended",handler:this.onEnded},{evt:"error",handler:this.onError},{evt:"loadeddata",handler:this.onLoadeddata},{evt:"loadstart",handler:this.onLoadStart},{evt:"canplay",handler:this.onCanplay},{evt:"progress",handler:this.onVideoProgress},{evt:"autoplay_was_prevented",handler:this.onNotAutoPlay},{evt:"seeking",handler:this.onSeeking},{evt:"seeked",handler:this.onSeeked},{evt:"replay",handler:this.onReplay},{evt:"timeupdate",handler:this.onTimeUpdate},{evt:"bufferedChange",handler:this.onBufferedChange},{evt:"beforeDefinitionChange",handler:this.onBeforeDefinitionChange},{evt:"bitrateChange",handler:this.onDefinitionChange},{evt:"bitrateChangeSuccess",handler:this.onDefiChangeSuccess},{evt:"replayBtnClick",handler:this.onReplayBtnClick},{evt:"ABR_CHANGE",handler:this.onAbrChange},{evt:wL,handler:this.onVodLog},{evt:"degrade",handler:this.onDegrade},{evt:"error",handler:this.onPlayerError},{evt:"drop_frames",handler:this.onDropFrames},{evt:"logger_cache",handler:this.onLoggerCache}],uC(e=this.listeners).call(e,function(e){t.player.on(e.evt,e.handler)}),this.bindUnload()}},{key:"addIfExist",value:function(e,t,n){if(SI(t)){var r=t[e];null!=r&&(n[e]=r)}}},{key:"sendSwitchOpera",value:function(e){this.onOneOperator({costTime:0,operaType:"detail_switch",stateBefore:"",stateAfter:"",endType:e})}},{key:"changeResolution",value:function(e){var t,n=e.from,r=e.to,i=e.startTime,o=e.operaType,a=e.abrInfo,s=e.endType,u=this.resLogs;n=Sn(n),r=Sn(r);var c=0,l={};u&&(u.ldet=w9(),u.df=r,u.lf=n,u.final_resolution=r,u.switch_count++,c=u.ldet-i,l={bc:u.bc,bu_acu_t:u.bu_acu_t,sc:u.sc,sat:u.sat,watch_dur:w3(u.played)}),a&&(l.abrInfo=a),this.resetDefiInfo(),null!==(t=this._options)&&void 0!==t&&t.closeResolutionLog||this.onOneOperator({costTime:c,operaType:o,endType:void 0===s?"":s,stateBefore:n,stateAfter:r},l,0)}},{key:"getLastInterval",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t[e],i=w9();return n&&(t[e]=i),-1===r?-1:i-r}},{key:"updateSeekPt",value:function(e){return this.getLastInterval("lastSeekStartTime",this.seekLog,e)}},{key:"_reportInvalidVV",value:function(e){return!!this._isInvaidVV()&&(this.onOneError({endState:e,errorType:9998,code:-1,url:this.player.src,headers:{}},0),this._isOnePlayReport=!0,!0)}},{key:"_isInvaidVV",value:function(){return 0===this.vt&&-1===this.curStatus}},{key:"bindUnload",value:function(){S_.isPC?window.addEventListener("beforeunload",this.onUnload):(S_.isMobile||S_.isPad)&&window.addEventListener("pagehide",this.onUnload),document.addEventListener("visibilitychange",this.onVisibilitychange)}},{key:"clearTimers",value:function(){var e=this.seekLog;(null==e?void 0:e.intervalId)&&window.clearTimeout(e.intervalId),this.stallIntervalId&&window.clearTimeout(this.stallIntervalId)}},{key:"_getFullScreenType",value:function(){return this.player.isFullscreen?wW.FULLSCREEN:this.player.isCssfullScreen?wW.CSS:wW.NO_FULLSCREEN}},{key:"updateAbrInfo",value:function(e,t,n){e.abr_general_info=t.generalInfo,e.abr_event_info.video_exit={local_time_ms:w7(),buffer_length:t.bufferLength,internet_speed:t.downloadSpeed,now_bitrate:t.nowBitrate,play_speed:n},t.getAbrPlayInfo&&(e.abr_play_info=t.getAbrPlayInfo())}},{key:"getPerformance",value:function(){return this.fvtObject||{}}},{key:"setExt",value:function(){var e,t=this,n=this.player.ext||{};n.performance&&delete n.performance,lD(e=uI(n)).call(e,function(e){"performance"!==e&&(t.exInfo[e]=n[e])})}},{key:"onOneOperator",value:function(e){var t,n=e.costTime,r=e.operaType,i=e.stateBefore,o=e.stateAfter,a=e.endType,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2,c=this.getLastInterval("lastOperaTime");this.onVideoProgress();var l={local_time:w7(),v:this.vid,opera_type:void 0===r?"":r,state_before:void 0===i?0:i,state_after:void 0===o?0:o,cost_time:void 0===n?0:n,end_type:(void 0===a?"":a)||this.end_type,cdn_url:this.url,resolution:this.curBitrate,last_interval:c,bufs:Sr(this.allBuffer),cur_play_pos:this.cur_play_pos,retry_count:this._retryCount,buf_include:this.checkInBuffer(this.player.currentTime)?1:0,dash_state:""};uC(t=uI(s)).call(t,function(e){l[e]=s[e]}),this.addIfExist("drm_type",this._options,l),this.reportLog(wO.ONE_OPERA,l,u)}},{key:"onOneError",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{code:0,url:"",headers:{},costTime:0,vid:"",message:"",preload_hit:0,preload_cached:0,interval_time:0},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;w8("onOneError",e);var n=this.errorLog,r=this.resLogs,i=this.playlogs,o=function(e){if(!e)return{};var t,n={};return lD(t=uI(Se)).call(t,function(t){if(e[t]||"string"!=typeof Se[t]){if(!e[t]&&Se[t]instanceof Array){var r,i=lC(r=Se[t]).call(r,function(t){return void 0!==e[t]});i.length>0?n[t]=e[i[0]]:n[t]=""}}else n[t]=e[Se[t]]||""}),n}(e.headers||{}),a=this.getPerformance(),s=e.code;this.setExt();var u=this._getCompatibilityInfo();this.setNovv(e,e.endState||wV.ERROR);var c=oJ(oJ(oJ({v:e.vid||this.vid,video_pos:this.cur_play_pos,local_time:w7(),cost_time:e&&e.costTime?e.costTime:0,errc:s,cdn_url:e.url||this.url,bufs:Sr(this.allBuffer),resolution:null==r?void 0:r.final_resolution,last_errors:null==n?void 0:n.last_errors.join(";"),vsc_message:e.message,server_ip:o.x_response_sinfo,initial_url:this.initial_url,initial_host:w6(this.initial_url)},o),{},{cur_play_pos:this.cur_play_pos},this.curBuffer),{},{degrade:null==i?void 0:i.degrade,end_state:e.endState||wV.ERROR,preload_hit:this.preloadHit,preload_cached:this.preloadDur,ex:Sr(this.exInfo),pref:Sr(a),video_ready_s:this.videoReadyState,interval_time:e.interval_time||0},u);c.net=u5(this.netLog),this.reportLog(wO.ONE_ERROR,c,t)}},{key:"_getCompatibilityInfo",value:function(){var e=function(){if("undefined"==typeof MediaSource||!MediaSource.isTypeSupported)return{support:!1,message:"MediaSource API not support"};for(var e=!1,t="",n=0;n2&&void 0!==arguments[2]?arguments[2]:0,o=this._options,a=this.player.ABTestTag,s=this.commonParams;n.dynamic_type=this.dynamicType;var u=null!=o&&o.absdkVersion&&"Array"===St(o.absdkVersion)?o.absdkVersion.toString():null==o?void 0:o.absdkVersion;n.absdkVersion=u||e.AB_SDK_VERSION,null!=a&&(n.abtest_tag=a);var c,l=this._options;if(n.codec_type=this.codecType,SI(l)&&(uC(wK).call(wK,function(e){r.addIfExist(e,l,n)}),n.vtype=this.vtype),SI(s)&&uC(c=uI(s)).call(c,function(e){r.addIfExist(e,s,n)}),n.env_info=Sr(this._envInfo||{}),n.support=SS(),n.visible="undefined"==typeof document?0:"visible"===document.visibilityState?1:0,1===i){var f={};return f[t]=n,void Sz.set(f)}2!==i?(this.player&&this.player.emit("abLog",t,n),this._track(t,n)):this.addEventsQueue(t,n)}},{key:"addEventsQueue",value:function(e,t){this.eventQueue.push({event:e,params:t});var n=this._options;null!=n&&n.maxQueueCount&&this.eventQueue.length>=n.maxQueueCount&&this.sendEventsQueue()}},{key:"sendEventsQueue",value:function(){for(;this.eventQueue.length>0;){var e=this.eventQueue.pop();e&&this._track(e.event,e.params)}}},{key:"appendStallInfo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.exInfo.stall||(this.exInfo.stall=[]);var r=this.exInfo.stall;if("start"===e){r.length>6&&dn(r).call(r,0,r.length-6);var i=this.curBuffer;r.push({start:t,end:-1,endType:"waitstart",cost:0,cur:this.cur_play_pos,buf_s:i.buf_s_pos,buf_e:i.buf_e_pos,buf_i:i.buf_include})}else if("end"===e){var o=r.length-1;if(o<0)return;r[o].end<0&&(r[o].end=t,r[o].endType=n,r[o].cost=t-r[o].start)}w8("appendStallInfo",r)}},{key:"suspendSeekStatus",value:function(e){var t,n,r,i,o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.isSeeking){var a=this.seekLog,s=this.resLogs,u=this.player,c=w9()-((null==a?void 0:a.lastSeekStartTime)||0);w8("suspendSeekStatus>>",ll(t=ll(n=ll(r=ll(i="".concat(e," currentTime:")).call(i,u.currentTime," costTime:")).call(r,c," sat:")).call(n,null==a?void 0:a.sat," resLogs.sat:")).call(t,null==s?void 0:s.sat)),a&&((null==a?void 0:a.intervalId)&&window.clearTimeout(a.intervalId),a.intervalId=null),this.isSeeking=!1;var l=this._endType=e,f=null==a?void 0:a.seekBefore,h=(u.currentTime||0).toString();a&&(a.sat+=c>36e5?0:c),s&&(s.sc++,s.sat+=c>36e5?0:c),c>36e5&&(c=36e5),this.updateSeekPt(!0),c>this._options.longWait&&this.reportPlayerLog(wY.SEEK_END),!this.closeSeekLog&&o&&this.onOneOperator({costTime:c,operaType:l,stateBefore:f,stateAfter:h,endType:e})}}},{key:"setPt",value:function(){var e,t=this.playlogs;this.startStep=1,null!=t&&t.pt||!this.player.currentTime||(this.isSeeking=!0),null!=t&&t.pt||!t||(t.pt=w7(),w8("setPt",ll(e="init pt :".concat(t.pt,", document.visibilityState:")).call(e,document.visibilityState)))}},{key:"setVt",value:function(){var e,t=this.playlogs;1===this.startStep&&(t&&!t.vt&&(t.vt=w7(),w8("setVt: first frame inited",ll(e="vt-pt:".concat(t.vt-t.pt," vt-nt:")).call(e,t.vt-t.nt))),this.startStep=2)}},{key:"getFrameInfo",value:function(){var e=this.videoFrameInfo;if(e.total){var t=e.dropped,n=e.corrupted,r=e.droppedRate;return{f_total:e.total,drop_count:t,drop_rate:r,corrupted:n}}return{f_total:0,drop_count:0,drop_rate:0,corrupted:0}}},{key:"getPlayerExt",value:function(){var e=this.player.ext;if(e)return e}},{key:"updateSpeedInfo",value:function(){var e,t=this.player.speedInfo;(null===(e=this.netLog)||void 0===e?void 0:e.length)>10&&this.netLog.shift(),t&&this.netLog.push(t)}},{key:"updateBuffers",value:function(){var e=this.player.buffered,t=[];if(!e||e.length<1)this.buffers.allBuffer=[];else{for(var n=0;n-1;s--){var u=hl((1e3*t.start(s)).toString(),10),c=hl((1e3*t.end(s)).toString(),10);if(a>=u&&a<=c){r.buf_include=1,r.buf_s_pos=u,r.buf_e_pos=c,r.buf_diff=c-a;break}ac&&(i<0||a-c1&&void 0!==arguments[1]?arguments[1]:0,n=this.player.buffered;if(!n)return!1;e=hl((1e3*e).toString(),10);for(var r=0;r=i&&e1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"!=typeof performance&&e)return performance.mark(e,t)}}],[{key:"AB_SDK_VERSION",get:function(){return Sx},set:function(e){Sx=e}},{key:"Collector",set:function(e){SP=e}},{key:"TEA_ID",get:function(){return SR},set:function(e){SD="__tea_cache_tokens_".concat(SR=e)}},{key:"defaultConfig",value:function(){return{line_app_id:"",waitTimeout:1e4,maxQueueCount:5,channel:"cn",absdkVersion:"",drm_type:0,tag:"普通视频",dynamic_type:"",sendLocalCallback:function(){},disableLocalCache:!1,closeResolutionLog:!0,closeSeekLog:!1,trackerConfig:{},envInfo:{},appVersion:"",enableAbTest:!1,ext:{},longWait:3e3}}}])}();SO.TEA_ID=1300,SO.Collector=bX;var SL=function(){function e(t){var n,r,i,o;return uE(this,e),oX((r=this,i=e,o=[t],i=lV(i),n=lP(r,lG()?lW(i,o||[],lV(r).constructor):i.apply(r,o))),"_vodLogger",void 0),n._vodLogger=new SO(n.player,n.config||{}),n}return lK(e,lq),uz(e,[{key:"levelInfo",get:function(){return this._vodLogger.levelInfo}},{key:"cumulateTime",get:function(){return this._vodLogger.cumulateTime}},{key:"videoFrameInfo",get:function(){return this._vodLogger.videoFrameInfo}},{key:"afterPlayerInit",value:function(){this._vodLogger.isAutoplay=this.player.autoPlayPolicy?1:0,this._vodLogger.resetStartTime(),this._vodLogger.onPlayerInited()}},{key:"reportBugPostPlayerLog",value:function(){this._vodLogger.reportPlayerLog(wq.USER_REPORT)}},{key:"beforePlayerInit",value:function(){this._vodLogger.reset()}},{key:"beforeDestroy",value:function(){this._vodLogger.onDestroy()}}],[{key:"pluginName",get:function(){return"VodLoggerPlugin"}},{key:"version",get:function(){return SA}},{key:"defaultConfig",get:function(){return{text:"点播埋点上报插件"}}},{key:"ABSdkVersion",set:function(e){SO.AB_SDK_VERSION=e}}])}();ta({global:!0,forced:v.globalThis!==v},{globalThis:v});var SM=d(v);function SB(e,t){if(t){var n=e.config;e.defineProperty&&e.defineProperty("curDefinition",{value:t,enumerable:!0,configurable:!0,writable:!0});try{e.curDefinition=t}catch(e){}if(n.baseConfig){if("string"==typeof t.url?n.baseConfig.url=t.url:ux(t.url)&&t.url.length>0&&(n.baseConfig.urlList=t.url,n.baseConfig.url=t.url[0].src),n.baseConfig.mediaInfo||(n.baseConfig.mediaInfo={}),n.baseConfig.mediaInfo.file_id=t.file_id,n.baseConfig.mediaInfo.bitrate=t.bitrate,ux(t.pktOffsetMap)&&t.pktOffsetMap.length>0){var r=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return(null==e||null===(t=hY(e).call(e,function(e){return(null==e?void 0:e.time)===n}))||void 0===t?void 0:t.offset)||0}(t.pktOffsetMap,5);r>0&&(n.baseConfig.firstLoadSize=r)}}else n.url=t.url}}function SN(e){var t,n=null;try{n=(null===(t=e.getProperty)||void 0===t?void 0:t.call(e,"curDefinition"))||e.curDefinition}catch(e){}return n}function SU(e,t,n){e.defineProperty&&e.defineProperty(t,{value:n,enumerable:!0,configurable:!0,writable:!0});try{e[t]=n}catch(e){}}function Sj(e){var t,n,r=e.config;return r.vid||(null===(t=r.baseConfig)||void 0===t||null===(t=t.mediaInfo)||void 0===t?void 0:t.vid)||(null===(n=r.baseConfig)||void 0===n||null===(n=n.mediaInfo)||void 0===n?void 0:n.id)||void 0}var SF=((ku=SF||{}).DEFAULT="default",ku.USER_SELECT="userSelect",ku.PRELOAD="preload",ku.BITRATE_ADAPTER="bitRateAdapter",ku.OVER_SCORE="overscore",ku),SG=((kc=SG||{})[kc.PRELOAD_NOT_HIT=0]="PRELOAD_NOT_HIT",kc[kc.ERROR_ON_FLY=1]="ERROR_ON_FLY",kc),SV=d(af),SH=d(o$),SK=d(o7),SW=d(ov),Sq=d(oP),SY=d(oU),SZ=d(oq);function SX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&kl[0]<4?1:+(kl[0]+kl[1])),!kf&&kL&&(!(kl=kL.match(/Edge\/(\d+)/))||kl[1]>=74)&&(kl=kL.match(/Chrome\/(\d+)/))&&(kf=+kl[1]);var kj=kf,kF=!!Object.getOwnPropertySymbols&&!S7(function(){var e=Symbol();return!String(e)||!(Object(e) instanceof Symbol)||!Symbol.sham&&kj&&kj<41}),kG=kF&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,kV=Object,kH=kG?function(e){return"symbol"==typeof e}:function(e){var t=kP("Symbol");return kx(t)&&kO(t.prototype,kV(e))},kK=String,kW=function(e){try{return kK(e)}catch(e){return"Object"}},kq=TypeError,kY=function(e){if(kx(e))return e;throw kq(kW(e)+" is not a function")},kZ=function(e,t){var n=e[t];return kk(n)?void 0:kY(n)},kX=TypeError,kQ={exports:{}},kJ=Object.defineProperty,k$=function(e,t){try{kJ(S8,e,{value:t,configurable:!0,writable:!0})}catch(n){S8[e]=t}return t},k0="__core-js_shared__",k1=S8[k0]||k$(k0,{});(kQ.exports=function(e,t){return k1[e]||(k1[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var k2=kQ.exports,k5=Object,k4=function(e){return k5(kT(e))},k3=kg({}.hasOwnProperty),k6=Object.hasOwn||function(e,t){return k3(k4(e),t)},k8=0,k9=Math.random(),k7=kg(1..toString),Ee=function(e){return"Symbol("+(void 0===e?"":e)+")_"+k7(++k8+k9,36)},Et=k2("wks"),En=S8.Symbol,Er=En&&En.for,Ei=kG?En:En&&En.withoutSetter||Ee,Eo=function(e){if(!k6(Et,e)||!kF&&"string"!=typeof Et[e]){var t="Symbol."+e;kF&&k6(En,e)?Et[e]=En[e]:Et[e]=kG&&Er?Er(t):Ei(t)}return Et[e]},Ea=function(e,t){var n,r;if("string"===t&&kx(n=e.toString)&&!kD(r=kr(n,e))||kx(n=e.valueOf)&&!kD(r=kr(n,e))||"string"!==t&&kx(n=e.toString)&&!kD(r=kr(n,e)))return r;throw kX("Can't convert object to primitive value")},Es=TypeError,Eu=Eo("toPrimitive"),Ec=function(e,t){if(!kD(e)||kH(e))return e;var n,r=kZ(e,Eu);if(r){if(void 0===t&&(t="default"),!kD(n=kr(r,e,t))||kH(n))return n;throw Es("Can't convert object to primitive value")}return void 0===t&&(t="number"),Ea(e,t)},El=function(e){var t=Ec(e,"string");return kH(t)?t:t+""},Ef=S8.document,Eh=kD(Ef)&&kD(Ef.createElement),Ed=function(e){return Eh?Ef.createElement(e):{}},Ep=!ke&&!S7(function(){return 7!=Object.defineProperty(Ed("div"),"a",{get:function(){return 7}}).a}),Ev=Object.getOwnPropertyDescriptor;S9.f=ke?Ev:function(e,t){if(e=kz(e),t=El(t),Ep)try{return Ev(e,t)}catch(e){}if(k6(e,t))return kh(!kr(ki.f,e,t),e[t])};var Eg={},Ey=ke&&S7(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Em=String,E_=TypeError,Eb=function(e){if(kD(e))return e;throw E_(Em(e)+" is not an object")},Ew=TypeError,ES=Object.defineProperty,Ek=Object.getOwnPropertyDescriptor,EE="enumerable",ET="configurable",Ez="writable";Eg.f=ke?Ey?function(e,t,n){if(Eb(e),t=El(t),Eb(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Ez in n&&!n[Ez]){var r=Ek(e,t);r&&r[Ez]&&(e[t]=n.value,n={configurable:ET in n?n[ET]:r[ET],enumerable:EE in n?n[EE]:r[EE],writable:!1})}return ES(e,t,n)}:ES:function(e,t,n){if(Eb(e),t=El(t),Eb(n),Ep)try{return ES(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Ew("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var EA=ke?function(e,t,n){return Eg.f(e,t,kh(1,n))}:function(e,t,n){return e[t]=n,e},EC={exports:{}},EI=Function.prototype,Ex=ke&&Object.getOwnPropertyDescriptor,ER=k6(EI,"name"),ED=ER&&(!ke||ke&&Ex(EI,"name").configurable),EP={EXISTS:ER,PROPER:ER&&"something"===(function(){}).name,CONFIGURABLE:ED},EO=kg(Function.toString);kx(k1.inspectSource)||(k1.inspectSource=function(e){return EO(e)});var EL,EM,EB,EN=k1.inspectSource,EU=S8.WeakMap,Ej=kx(EU)&&/native code/.test(String(EU)),EF=k2("keys"),EG=function(e){return EF[e]||(EF[e]=Ee(e))},EV={},EH="Object already initialized",EK=S8.TypeError,EW=S8.WeakMap;if(Ej||k1.state){var Eq=k1.state||(k1.state=new EW);Eq.get=Eq.get,Eq.has=Eq.has,Eq.set=Eq.set,EL=function(e,t){if(Eq.has(e))throw EK(EH);return t.facade=e,Eq.set(e,t),t},EM=function(e){return Eq.get(e)||{}},EB=function(e){return Eq.has(e)}}else{var EY=EG("state");EV[EY]=!0,EL=function(e,t){if(k6(e,EY))throw EK(EH);return t.facade=e,EA(e,EY,t),t},EM=function(e){return k6(e,EY)?e[EY]:{}},EB=function(e){return k6(e,EY)}}var EZ={set:EL,get:EM,has:EB,enforce:function(e){return EB(e)?EM(e):EL(e,{})},getterFor:function(e){return function(t){var n;if(!kD(t)||(n=EM(t)).type!==e)throw EK("Incompatible receiver, "+e+" required");return n}}},EX=EP.CONFIGURABLE,EQ=EZ.enforce,EJ=EZ.get,E$=Object.defineProperty,E0=ke&&!S7(function(){return 8!==E$(function(){},"length",{value:8}).length}),E1=String(String).split("String"),E2=EC.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!k6(e,"name")||EX&&e.name!==t)&&(ke?E$(e,"name",{value:t,configurable:!0}):e.name=t),E0&&n&&k6(n,"arity")&&e.length!==n.arity&&E$(e,"length",{value:n.arity});try{n&&k6(n,"constructor")&&n.constructor?ke&&E$(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=EQ(e);return k6(r,"source")||(r.source=E1.join("string"==typeof t?t:"")),e};Function.prototype.toString=E2(function(){return kx(this)&&EJ(this).source||EN(this)},"toString");var E5=EC.exports,E4=function(e,t,n,r){r||(r={});var i=r.enumerable,o=void 0!==r.name?r.name:t;if(kx(n)&&E5(n,o,r),r.global)i?e[t]=n:k$(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=n:Eg.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},E3={},E6=Math.ceil,E8=Math.floor,E9=Math.trunc||function(e){var t=+e;return(t>0?E8:E6)(t)},E7=function(e){var t=+e;return t!=t||0===t?0:E9(t)},Te=Math.max,Tt=Math.min,Tn=function(e,t){var n=E7(e);return n<0?Te(n+t,0):Tt(n,t)},Tr=Math.min,Ti=function(e){return e>0?Tr(E7(e),9007199254740991):0},To=function(e){return Ti(e.length)},Ta=function(e){return function(t,n,r){var i,o=kz(t),a=To(o),s=Tn(r,a);if(e&&n!=n){for(;a>s;)if((i=o[s++])!=i)return!0}else for(;a>s;s++)if((e||s in o)&&o[s]===n)return e||s||0;return!e&&-1}},Ts={includes:Ta(!0),indexOf:Ta(!1)},Tu=Ts.indexOf,Tc=kg([].push),Tl=function(e,t){var n,r=kz(e),i=0,o=[];for(n in r)!k6(EV,n)&&k6(r,n)&&Tc(o,n);for(;t.length>i;)k6(r,n=t[i++])&&(~Tu(o,n)||Tc(o,n));return o},Tf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Th=Tf.concat("length","prototype");E3.f=Object.getOwnPropertyNames||function(e){return Tl(e,Th)};var Td={};Td.f=Object.getOwnPropertySymbols;var Tp=kg([].concat),Tv=kP("Reflect","ownKeys")||function(e){var t=E3.f(Eb(e)),n=Td.f;return n?Tp(t,n(e)):t},Tg=/#|\.prototype\./,Ty=function(e,t){var n=T_[Tm(e)];return n==Tw||n!=Tb&&(kx(t)?S7(t):!!t)},Tm=Ty.normalize=function(e){return String(e).replace(Tg,".").toLowerCase()},T_=Ty.data={},Tb=Ty.NATIVE="N",Tw=Ty.POLYFILL="P",TS=S9.f,Tk=function(e,t,n){for(var r=Tv(t),i=Eg.f,o=S9.f,a=0;a9007199254740991)throw Tz("Maximum allowed index exceeded");return e},TC=function(e,t,n){var r=El(t);r in e?Eg.f(e,r,kh(0,n)):e[r]=n},TI=Eo("toStringTag"),Tx={};Tx[TI]="z";var TR="[object z]"===String(Tx),TD=Eo("toStringTag"),TP=Object,TO="Arguments"==k_(function(){return arguments}()),TL=function(e,t){try{return e[t]}catch(e){}},TM=TR?k_:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=TL(t=TP(e),TD))?n:TO?k_(t):"Object"==(r=k_(t))&&kx(t.callee)?"Arguments":r},TB=function(){},TN=[],TU=kP("Reflect","construct"),Tj=/^\s*(?:class|function)\b/,TF=kg(Tj.exec),TG=!Tj.exec(TB),TV=function(e){if(!kx(e))return!1;try{return TU(TB,TN,e),!0}catch(e){return!1}},TH=function(e){if(!kx(e))return!1;switch(TM(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return TG||!!TF(Tj,EN(e))}catch(e){return!0}};TH.sham=!0;var TK=!TU||S7(function(){var e;return TV(TV.call)||!TV(Object)||!TV(function(){e=!0})||e})?TH:TV,TW=Eo("species"),Tq=Array,TY=function(e){var t;return TT(e)&&(TK(t=e.constructor)&&(t===Tq||TT(t.prototype))||kD(t)&&null===(t=t[TW]))&&(t=void 0),void 0===t?Tq:t},TZ=function(e,t){return new(TY(e))(0===t?0:t)},TX=Eo("species"),TQ=function(e){return kj>=51||!S7(function(){var t=[];return(t.constructor={})[TX]=function(){return{foo:1}},1!==t[e](Boolean).foo})},TJ=Eo("isConcatSpreadable"),T$=kj>=51||!S7(function(){var e=[];return e[TJ]=!1,e.concat()[0]!==e}),T0=TQ("concat"),T1=function(e){if(!kD(e))return!1;var t=e[TJ];return void 0!==t?!!t:TT(e)};TE({target:"Array",proto:!0,arity:1,forced:!T$||!T0},{concat:function(e){var t,n,r,i,o,a=k4(this),s=TZ(a,0),u=0;for(t=-1,r=arguments.length;ta;)Eg.f(e,n=i[a++],r[n]);return e};var T4,T3=kP("document","documentElement"),T6="prototype",T8="script",T9=EG("IE_PROTO"),T7=function(){},ze=function(e){return"<"+T8+">"+e+""},zt=function(e){e.write(ze("")),e.close();var t=e.parentWindow.Object;return e=null,t},zn=function(){var e,t=Ed("iframe");return t.style.display="none",T3.appendChild(t),t.src=String("java"+T8+":"),(e=t.contentWindow.document).open(),e.write(ze("document.F=Object")),e.close(),e.F},zr=function(){try{T4=new ActiveXObject("htmlfile")}catch(e){}zr="undefined"!=typeof document?document.domain&&T4?zt(T4):zn():zt(T4);for(var e=Tf.length;e--;)delete zr[T6][Tf[e]];return zr()};EV[T9]=!0;var zi=Object.create||function(e,t){var n;return null!==e?(T7[T6]=Eb(e),n=new T7,T7[T6]=null,n[T9]=e):n=zr(),void 0===t?n:T2.f(n,t)},zo=Eg.f,za=Eo("unscopables"),zs=Array.prototype;null==zs[za]&&zo(zs,za,{configurable:!0,value:zi(null)});var zu,zc,zl,zf=function(e){zs[za][e]=!0},zh={},zd=!S7(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),zp=EG("IE_PROTO"),zv=Object,zg=zv.prototype,zy=zd?zv.getPrototypeOf:function(e){var t=k4(e);if(k6(t,zp))return t[zp];var n=t.constructor;return kx(n)&&t instanceof n?n.prototype:t instanceof zv?zg:null},zm=Eo("iterator"),z_=!1;[].keys&&("next"in(zl=[].keys())?(zc=zy(zy(zl)))!==Object.prototype&&(zu=zc):z_=!0),(!kD(zu)||S7(function(){var e={};return zu[zm].call(e)!==e}))&&(zu={}),kx(zu[zm])||E4(zu,zm,function(){return this});var zb={IteratorPrototype:zu,BUGGY_SAFARI_ITERATORS:z_},zw=Eg.f,zS=Eo("toStringTag"),zk=function(e,t,n){e&&!n&&(e=e.prototype),e&&!k6(e,zS)&&zw(e,zS,{configurable:!0,value:t})},zE=zb.IteratorPrototype,zT=function(){return this},zz=String,zA=TypeError,zC=function(e){if("object"==typeof e||kx(e))return e;throw zA("Can't set "+zz(e)+" as a prototype")},zI=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=kg(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Eb(n),zC(r),t?e(n,r):n.__proto__=r,n}}():void 0),zx=function(e,t,n,r){var i=t+" Iterator";return e.prototype=zi(zE,{next:kh(+!r,n)}),zk(e,i,!1),zh[i]=zT,e},zR=EP.PROPER,zD=EP.CONFIGURABLE,zP=zb.IteratorPrototype,zO=zb.BUGGY_SAFARI_ITERATORS,zL=Eo("iterator"),zM="keys",zB="values",zN="entries",zU=function(){return this},zj=function(e,t,n,r,i,o,a){zx(n,t,r);var s,u,c,l=function(e){if(e===i&&v)return v;if(!zO&&e in d)return d[e];switch(e){case zM:case zB:case zN:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",h=!1,d=e.prototype,p=d[zL]||d["@@iterator"]||i&&d[i],v=!zO&&p||l(i),g="Array"==t&&d.entries||p;if(g&&(s=zy(g.call(new e)))!==Object.prototype&&s.next&&(zy(s)!==zP&&(zI?zI(s,zP):kx(s[zL])||E4(s,zL,zU)),zk(s,f,!0)),zR&&i==zB&&p&&p.name!==zB&&(zD?EA(d,"name",zB):(h=!0,v=function(){return kr(p,this)})),i){if(u={values:l(zB),keys:o?v:l(zM),entries:l(zN)},a)for(c in u)!zO&&!h&&c in d||E4(d,c,u[c]);else TE({target:t,proto:!0,forced:zO||h},u)}return d[zL]!==v&&E4(d,zL,v,{name:i}),zh[t]=v,u},zF=function(e,t){return{value:e,done:t}},zG=Eg.f,zV="Array Iterator",zH=EZ.set,zK=EZ.getterFor(zV),zW=zj(Array,"Array",function(e,t){zH(this,{type:zV,target:kz(e),index:0,kind:t})},function(){var e=zK(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,zF(void 0,!0)):zF("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)},"values"),zq=zh.Arguments=zh.Array;if(zf("keys"),zf("values"),zf("entries"),ke&&"values"!==zq.name)try{zG(zq,"name",{value:"values"})}catch(e){}var zY=kg([].slice),zZ=TQ("slice"),zX=Eo("species"),zQ=Array,zJ=Math.max;TE({target:"Array",proto:!0,forced:!zZ},{slice:function(e,t){var n,r,i,o=kz(this),a=To(o),s=Tn(e,a),u=Tn(void 0===t?a:t,a);if(TT(o)&&((TK(n=o.constructor)&&(n===zQ||TT(n.prototype))||kD(n)&&null===(n=n[zX]))&&(n=void 0),n===zQ||void 0===n))return zY(o,s,u);for(r=new(void 0===n?zQ:n)(zJ(u-s,0)),i=0;so;o++)if((s=y(e[o]))&&kO(Aw,s))return s;return new Ab(!1)}r=Ay(e,i)}for(u=h?e.next:r.next;!(c=kr(u,r)).done;){try{s=y(c.value)}catch(e){Am(r,"throw",e)}if("object"==typeof s&&s&&kO(Aw,s))return s}return new Ab(!1)},Ak=TypeError,AE=function(e,t){if(kO(t,e))return e;throw Ak("Incorrect invocation")},AT=Eo("iterator"),Az=!1;try{var AA=0,AC={next:function(){return{done:!!AA++}},return:function(){Az=!0}};AC[AT]=function(){return this},Array.from(AC,function(){throw 2})}catch(e){}var AI=function(e,t){if(!t&&!Az)return!1;var n=!1;try{var r={};r[AT]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Ax=function(e,t,n){var r,i;return zI&&kx(r=t.constructor)&&r!==n&&kD(i=r.prototype)&&i!==n.prototype&&zI(e,i),e},AR=function(e,t,n){for(var r in t)E4(e,r,t[r],n);return e},AD=Eo("species"),AP=function(e){var t=kP(e),n=Eg.f;ke&&t&&!t[AD]&&n(t,AD,{configurable:!0,get:function(){return this}})},AO=Eg.f,AL=As.fastKey,AM=EZ.set,AB=EZ.getterFor;!function(e,t,n){var r=-1!=="Map".indexOf("Map"),i=-1!==e.indexOf("Weak"),o=r?"set":"add",a=S8[e],s=a&&a.prototype,u=a,c={},l=function(e){var t=kg(s[e]);E4(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(i&&!kD(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return i&&!kD(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(i&&!kD(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(Ty(e,!kx(a)||!(i||s.forEach&&!S7(function(){(new a).entries().next()}))))u=n.getConstructor(t,e,r,o),As.enable();else if(Ty(e,!0)){var f=new u,h=f[o](i?{}:-0,1)!=f,d=S7(function(){f.has(1)}),p=AI(function(e){new a(e)}),v=!i&&S7(function(){for(var e=new a,t=5;t--;)e[o](t,t);return!e.has(-0)});p||((u=t(function(e,t){AE(e,s);var n=Ax(new a,e,u);return kk(t)||AS(t,n[o],{that:n,AS_ENTRIES:r}),n})).prototype=s,s.constructor=u),(d||v)&&(l("delete"),l("has"),r&&l("get")),(v||h)&&l(o),i&&s.clear&&delete s.clear}c[e]=u,TE({global:!0,constructor:!0,forced:u!=a},c),zk(u,e),i||n.setStrong(u,e,r)}("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,t,n,r){var i=e(function(e,i){AE(e,o),AM(e,{type:t,index:zi(null),first:void 0,last:void 0,size:0}),ke||(e.size=0),kk(i)||AS(i,e[r],{that:e,AS_ENTRIES:n})}),o=i.prototype,a=AB(t),s=function(e,t,n){var r,i,o=a(e),s=u(e,t);return s?s.value=n:(o.last=s={index:i=AL(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=s),r&&(r.next=s),ke?o.size++:e.size++,"F"!==i&&(o.index[i]=s)),e},u=function(e,t){var n,r=a(e),i=AL(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return AR(o,{clear:function(){for(var e=a(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,ke?e.size=0:this.size=0},delete:function(e){var t=a(this),n=u(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),ke?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=a(this),r=Al(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),AR(o,n?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),ke&&AO(o,"size",{get:function(){return a(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=AB(t),o=AB(r);zj(e,t,function(e,t){AM(this,{type:r,target:e,state:i(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?zF("keys"==t?n.key:"values"==t?n.value:[n.key,n.value],!1):(e.target=void 0,zF(void 0,!0))},n?"entries":"values",!n,!0),AP(t)}});var AN=kg(1..valueOf),AU=String,Aj=function(e){if("Symbol"===TM(e))throw TypeError("Cannot convert a Symbol value to a string");return AU(e)},AF=kg("".replace),AG="[ \n\v\f\r \xa0               \u2028\u2029\uFEFF]",AV=RegExp("^"+AG+AG+"*"),AH=RegExp(AG+AG+"*$"),AK=function(e){return function(t){var n=Aj(kT(t));return 1&e&&(n=AF(n,AV,"")),2&e&&(n=AF(n,AH,"")),n}},AW={start:AK(1),end:AK(2),trim:AK(3)},Aq=E3.f,AY=S9.f,AZ=Eg.f,AX=AW.trim,AQ="Number",AJ=S8[AQ],A$=AJ.prototype,A0=S8.TypeError,A1=kg("".slice),A2=kg("".charCodeAt),A5=function(e){var t=Ec(e,"number");return"bigint"==typeof t?t:A4(t)},A4=function(e){var t,n,r,i,o,a,s,u,c=Ec(e,"number");if(kH(c))throw A0("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2){if(43===(t=A2(c=AX(c),0))||45===t){if(88===(n=A2(c,2))||120===n)return NaN}else if(48===t){switch(A2(c,1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=A1(c,2)).length,s=0;si)return NaN;return parseInt(o,r)}}return+c};if(Ty(AQ,!AJ(" 0o1")||!AJ("0b1")||AJ("+0x1"))){for(var A3,A6=function(e){var t=arguments.length<1?0:AJ(A5(e)),n=this;return kO(A$,n)&&S7(function(){AN(n)})?Ax(Object(t),n,A6):t},A8=ke?Aq(AJ):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),A9=0;A8.length>A9;A9++)k6(AJ,A3=A8[A9])&&!k6(A6,A3)&&AZ(A6,A3,AY(AJ,A3));A6.prototype=A$,A$.constructor=A6,E4(S8,AQ,A6,{constructor:!0})}var A7=Object.assign,Ce=Object.defineProperty,Ct=kg([].concat),Cn=!A7||S7(function(){if(ke&&1!==A7({b:1},A7(Ce({},"a",{enumerable:!0,get:function(){Ce(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=A7({},e)[n]||T5(A7({},t)).join("")!=r})?function(e,t){for(var n=k4(e),r=arguments.length,i=1,o=Td.f,a=ki.f;r>i;)for(var s,u=kS(arguments[i++]),c=o?Ct(T5(u),o(u)):T5(u),l=c.length,f=0;l>f;)s=c[f++],ke&&!kr(a,u,s)||(n[s]=u[s]);return n}:A7;TE({target:"Object",stat:!0,arity:2,forced:Object.assign!==Cn},{assign:Cn});TR||E4(Object.prototype,"toString",TR?({}).toString:function(){return"[object "+TM(this)+"]"},{unsafe:!0});var Cr=function(){var e=Eb(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Ci=RegExp.prototype,Co=EP.PROPER,Ca=function(e){var t=e.flags;return void 0!==t||"flags"in Ci||k6(e,"flags")||!kO(Ci,e)?t:kr(Cr,e)},Cs="toString",Cu=RegExp.prototype[Cs],Cc=S7(function(){return"/a/b"!=Cu.call({source:"a",flags:"b"})}),Cl=Co&&Cu.name!=Cs;(Cc||Cl)&&E4(RegExp.prototype,Cs,function(){var e=Eb(this);return"/"+Aj(e.source)+"/"+Aj(Ca(e))},{unsafe:!0});var Cf=kg("".charAt),Ch=kg("".charCodeAt),Cd=kg("".slice),Cp=function(e){return function(t,n){var r,i,o=Aj(kT(t)),a=E7(n),s=o.length;return a<0||a>=s?e?"":void 0:(r=Ch(o,a))<55296||r>56319||a+1===s||(i=Ch(o,a+1))<56320||i>57343?e?Cf(o,a):r:e?Cd(o,a,a+2):i-56320+(r-55296<<10)+65536}},Cv={codeAt:Cp(!1),charAt:Cp(!0)},Cg=Cv.charAt,Cy="String Iterator",Cm=EZ.set,C_=EZ.getterFor(Cy);zj(String,"String",function(e){Cm(this,{type:Cy,string:Aj(e),index:0})},function(){var e,t=C_(this),n=t.string,r=t.index;return r>=n.length?zF(void 0,!0):(e=Cg(n,r),t.index+=e.length,zF(e,!1))});TE({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var e,t=Eb(this),n=kY(t.delete),r=!0,i=0,o=arguments.length;i1?arguments[1]:void 0);return!AS(n,function(e,n,i){if(!r(n,e,t))return i()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Cw=TypeError,CS=function(e){if(TK(e))return e;throw Cw(kW(e)+" is not a constructor")},Ck=Eo("species"),CE=function(e,t){var n,r=Eb(e).constructor;return void 0===r||kk(n=Eb(r)[Ck])?t:CS(n)};TE({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=Eb(this),n=Cb(t),r=Al(e,arguments.length>1?arguments[1]:void 0),i=new(CE(t,kP("Map"))),o=kY(i.set);return AS(n,function(e,n){r(n,e,t)&&kr(o,i,e,n)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});TE({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=Eb(this),n=Cb(t),r=Al(e,arguments.length>1?arguments[1]:void 0);return AS(n,function(e,n,i){if(r(n,e,t))return i(n)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});TE({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=Eb(this),n=Cb(t),r=Al(e,arguments.length>1?arguments[1]:void 0);return AS(n,function(e,n,i){if(r(n,e,t))return i(e)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});TE({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return AS(Cb(Eb(this)),function(t,n,r){var i,o;if((i=n)===(o=e)||i!=i&&o!=o)return r()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});TE({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){return AS(Cb(Eb(this)),function(t,n,r){if(n===e)return r(t)},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).result}});TE({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=Eb(this),n=Cb(t),r=Al(e,arguments.length>1?arguments[1]:void 0),i=new(CE(t,kP("Map"))),o=kY(i.set);return AS(n,function(e,n){kr(o,i,r(n,e,t),n)},{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});TE({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=Eb(this),n=Cb(t),r=Al(e,arguments.length>1?arguments[1]:void 0),i=new(CE(t,kP("Map"))),o=kY(i.set);return AS(n,function(e,n){kr(o,i,e,r(n,e,t))},{AS_ENTRIES:!0,IS_ITERATOR:!0}),i}});TE({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=Eb(this),n=kY(t.set),r=arguments.length,i=0;i1?arguments[1]:void 0);return AS(n,function(e,n,i){if(r(n,e,t))return i()},{AS_ENTRIES:!0,IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}});var Cz=TypeError;TE({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var n=Eb(this),r=kY(n.get),i=kY(n.has),o=kY(n.set),a=arguments.length;kY(t);var s=kr(i,n,e);if(!s&&a<3)throw Cz("Updating absent value");var u=s?kr(r,n,e):kY(a>2?arguments[2]:void 0)(e,n);return kr(o,n,e,t(u,e,n)),n}});var CA={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},CC=Ed("span").classList,CI=CC&&CC.constructor&&CC.constructor.prototype,Cx=CI===Object.prototype?void 0:CI,CR=kg([].push),CD=function(e){var t=1==e,n=2==e,r=3==e,i=4==e,o=6==e,a=7==e,s=5==e||o;return function(u,c,l,f){for(var h,d,p=k4(u),v=kS(p),g=Al(c,l),y=To(v),m=0,_=f||TZ,b=t?_(u,y):n||a?_(u,0):void 0;y>m;m++)if((s||m in v)&&(d=g(h=v[m],m,p),e)){if(t)b[m]=d;else if(d)switch(e){case 3:return!0;case 5:return h;case 6:return m;case 2:CR(b,h)}else switch(e){case 4:return!1;case 7:CR(b,h)}}return o?-1:r||i?i:b}},CP={forEach:CD(0),map:CD(1),filter:CD(2),some:CD(3),every:CD(4),find:CD(5),findIndex:CD(6),filterReject:CD(7)},CO=function(e,t){var n=[][e];return!!n&&S7(function(){n.call(null,t||function(){return 1},1)})},CL=CP.forEach,CM=CO("forEach")?[].forEach:function(e){return CL(this,e,arguments.length>1?arguments[1]:void 0)},CB=function(e){if(e&&e.forEach!==CM)try{EA(e,"forEach",CM)}catch(t){e.forEach=CM}};for(var CN in CA)CA[CN]&&CB(S8[CN]&&S8[CN].prototype);CB(Cx);var CU=Eo("iterator"),Cj=Eo("toStringTag"),CF=zW.values,CG=function(e,t){if(e){if(e[CU]!==CF)try{EA(e,CU,CF)}catch(t){e[CU]=CF}if(e[Cj]||EA(e,Cj,t),CA[t]){for(var n in zW)if(e[n]!==zW[n])try{EA(e,n,zW[n])}catch(t){e[n]=zW[n]}}}};for(var CV in CA)CG(S8[CV]&&S8[CV].prototype,CV);CG(Cx,"DOMTokenList");var CH,CK,CW,Cq,CY="process"==k_(S8.process),CZ=Function.prototype,CX=CZ.apply,CQ=CZ.call,CJ="object"==typeof Reflect&&Reflect.apply||(kt?CQ.bind(CX):function(){return CQ.apply(CX,arguments)}),C$=TypeError,C0=/(?:ipad|iphone|ipod).*applewebkit/i.test(kL),C1=function(e,t){if(e10){var n=t.pop();n&&(this.fps=Math.floor(1e4/(e-n)),this.updateFpsInfo())}this.isStoped||(this.rafId=window.requestAnimationFrame(this.step))}},{key:"updateFpsInfo",value:function(){this.fps>this.maxFps&&(this.maxFps=this.fps)}},{key:"start",value:function(){void 0!==window.requestAnimationFrame&&(this.isStoped=!1,this.rafId=window.requestAnimationFrame(this.step))}},{key:"stop",value:function(){window.cancelAnimationFrame(this.rafId),this.isStoped=!0}}],[{key:"install",value:function(){xv.install()}}]),e}(),xy=S8.RegExp,xm=S7(function(){var e=xy("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),x_=xm||S7(function(){return!xy("a","y").sticky}),xb={BROKEN_CARET:xm||S7(function(){var e=xy("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),MISSED_STICKY:x_,UNSUPPORTED_Y:xm},xw=S8.RegExp,xS=S7(function(){var e=xw(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),xk=S8.RegExp,xE=S7(function(){var e=xk("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")}),xT=EZ.get,xz=k2("native-string-replace",String.prototype.replace),xA=RegExp.prototype.exec,xC=xA,xI=kg("".charAt),xx=kg("".indexOf),xR=kg("".replace),xD=kg("".slice),xP=(x2=/b*/g,kr(xA,x1=/a/,"a"),kr(xA,x2,"a"),0!==x1.lastIndex||0!==x2.lastIndex),xO=xb.BROKEN_CARET,xL=void 0!==/()??/.exec("")[1];(xP||xL||xO||xS||xE)&&(xC=function(e){var t,n,r,i,o,a,s,u=xT(this),c=Aj(e),l=u.raw;if(l)return l.lastIndex=this.lastIndex,t=kr(xC,l,c),this.lastIndex=l.lastIndex,t;var f=u.groups,h=xO&&this.sticky,d=kr(Cr,this),p=this.source,v=0,g=c;if(h&&(-1===xx(d=xR(d,"y",""),"g")&&(d+="g"),g=xD(c,this.lastIndex),this.lastIndex>0&&(!this.multiline||this.multiline&&"\n"!==xI(c,this.lastIndex-1))&&(p="(?: "+p+")",g=" "+g,v++),n=RegExp("^(?:"+p+")",d)),xL&&(n=RegExp("^"+p+"$(?!\\s)",d)),xP&&(r=this.lastIndex),i=kr(xA,h?n:this,g),h?i?(i.input=xD(i.input,v),i[0]=xD(i[0],v),i.index=this.lastIndex,this.lastIndex+=i[0].length):this.lastIndex=0:xP&&i&&(this.lastIndex=this.global?i.index+i[0].length:r),xL&&i&&i.length>1&&kr(xz,i[0],n,function(){for(o=1;o1||"".split(/.?/).length?function(e,n){var r=Aj(kT(this)),i=void 0===n?4294967295:n>>>0;if(0===i)return[];if(void 0===e)return[r];if(!xj(e))return kr(t,r,e,i);for(var o,a,s,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,f=RegExp(e.source,c+"g");(o=kr(xM,f,r))&&!((a=f.lastIndex)>l&&(xY(u,xZ(r,l,o.index)),o.length>1&&o.index=i));)f.lastIndex===o.index&&f.lastIndex++;return l===r.length?!s&&xq(f,"")||xY(u,""):xY(u,xZ(r,l)),u.length>i?z5(u,0,i):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:kr(t,this,e,n)}:t,[function(t,n){var i=kT(this),o=kk(t)?void 0:kZ(t,e);return o?kr(o,t,i,n):kr(r,Aj(i),t,n)},function(e,i){var o=Eb(this),a=Aj(e),s=n(r,o,a,i,r!==t);if(s.done)return s.value;var u=CE(o,RegExp),c=o.unicode,l=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(xH?"g":"y"),f=new u(xH?"^(?:"+o.source+")":o,l),h=void 0===i?4294967295:i>>>0;if(0===h)return[];if(0===a.length)return null===xV(f,a)?[a]:[];for(var d=0,p=0,v=[];p=0;t--){var n=localStorage.key(t);0===h6(n).call(n,e)&&localStorage.removeItem(n)}}catch(e){}},getItem:function(e){try{return localStorage.getItem(e)}catch(e){return null}},key:function(e){try{return localStorage.key(e)}catch(e){return null}},setItem:function(e,t){try{localStorage.setItem(e,t)}catch(e){}},removeItem:function(e){try{localStorage.removeItem(e)}catch(e){}},isSupport:x$},x8=function(){function e(){xh(this,e);var t,n,r=new uA(function(e,r){t=e,n=r});return r.resolve=t,r.reject=n,r}return xp(e,[{key:"resolve",value:function(e){}},{key:"reject",value:function(e){}}]),e}(),x9={exports:{}},x7="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Re=Eg.f,Rt=EZ.enforce,Rn=EZ.get,Rr=S8.Int8Array,Ri=Rr&&Rr.prototype,Ro=S8.Uint8ClampedArray,Ra=Ro&&Ro.prototype,Rs=Rr&&zy(Rr),Ru=Ri&&zy(Ri),Rc=Object.prototype,Rl=S8.TypeError,Rf=Eo("toStringTag"),Rh=Ee("TYPED_ARRAY_TAG"),Rd="TypedArrayConstructor",Rp=x7&&!!zI&&"Opera"!==TM(S8.opera),Rv=!1,Rg={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ry={BigInt64Array:8,BigUint64Array:8},Rm=function(e){var t=zy(e);if(kD(t)){var n=Rn(t);return n&&k6(n,Rd)?n[Rd]:Rm(t)}},R_=function(e){if(!kD(e))return!1;var t=TM(e);return k6(Rg,t)||k6(Ry,t)};for(x5 in Rg)(x3=(x4=S8[x5])&&x4.prototype)?Rt(x3)[Rd]=x4:Rp=!1;for(x5 in Ry)(x3=(x4=S8[x5])&&x4.prototype)&&(Rt(x3)[Rd]=x4);if((!Rp||!kx(Rs)||Rs===Function.prototype)&&(Rs=function(){throw Rl("Incorrect invocation")},Rp))for(x5 in Rg)S8[x5]&&zI(S8[x5],Rs);if((!Rp||!Ru||Ru===Rc)&&(Ru=Rs.prototype,Rp))for(x5 in Rg)S8[x5]&&zI(S8[x5].prototype,Ru);if(Rp&&zy(Ra)!==Ru&&zI(Ra,Ru),ke&&!k6(Ru,Rf))for(x5 in Rv=!0,Re(Ru,Rf,{get:function(){return kD(this)?this[Rh]:void 0}}),Rg)S8[x5]&&EA(S8[x5],Rh,x5);var Rb={NATIVE_ARRAY_BUFFER_VIEWS:Rp,TYPED_ARRAY_TAG:Rv&&Rh,aTypedArray:function(e){if(R_(e))return e;throw Rl("Target is not a typed array")},aTypedArrayConstructor:function(e){if(kx(e)&&(!zI||kO(Rs,e)))return e;throw Rl(kW(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(ke){if(n)for(var i in Rg){var o=S8[i];if(o&&k6(o.prototype,e))try{delete o.prototype[e]}catch(n){try{o.prototype[e]=t}catch(e){}}}Ru[e]&&!n||E4(Ru,e,n?t:Rp&&Ri[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(ke){if(zI){if(n){for(r in Rg)if((i=S8[r])&&k6(i,e))try{delete i[e]}catch(e){}}if(Rs[e]&&!n)return;try{return E4(Rs,e,n?t:Rp&&Rs[e]||t)}catch(e){}}for(r in Rg)(i=S8[r])&&(!i[e]||n)&&E4(i,e,t)}},getTypedArrayConstructor:Rm,isView:function(e){if(!kD(e))return!1;var t=TM(e);return"DataView"===t||k6(Rg,t)||k6(Ry,t)},isTypedArray:R_,TypedArray:Rs,TypedArrayPrototype:Ru},Rw=Rb.NATIVE_ARRAY_BUFFER_VIEWS,RS=S8.ArrayBuffer,Rk=S8.Int8Array,RE=!Rw||!S7(function(){Rk(1)})||!S7(function(){new Rk(-1)})||!AI(function(e){new Rk,new Rk(null),new Rk(1.5),new Rk(e)},!0)||S7(function(){return 1!==new Rk(new RS(2),1,void 0).length}),RT=RangeError,Rz=function(e){if(void 0===e)return 0;var t=E7(e),n=Ti(t);if(t!==n)throw RT("Wrong length or index");return n},RA=Array,RC=Math.abs,RI=Math.pow,Rx=Math.floor,RR=Math.log,RD=Math.LN2,RP=function(e){for(var t=k4(this),n=To(t),r=arguments.length,i=Tn(r>1?arguments[1]:void 0,n),o=r>2?arguments[2]:void 0,a=void 0===o?n:Tn(o,n);a>i;)t[i++]=e;return t},RO=function(e,t,n){var r,i,o,a=RA(n),s=8*n-t-1,u=(1<>1,l=23===t?RI(2,-24)-RI(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=RC(e))!=e||e===1/0?(i=e!=e?1:0,r=u):(r=Rx(RR(e)/RD),e*(o=RI(2,-r))<1&&(r--,o*=2),(e+=r+c>=1?l/o:l*RI(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*RI(2,t),r+=c):(i=e*RI(2,c-1)*RI(2,t),r=0));t>=8;)a[h++]=255&i,i/=256,t-=8;for(r=r<0;)a[h++]=255&r,r/=256,s-=8;return a[--h]|=128*f,a},RL=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<>1,s=i-7,u=r-1,c=e[u--],l=127&c;for(c>>=7;s>0;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;s>0;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:c?-Infinity:1/0;n+=RI(2,t),l-=a}return(c?-1:1)*n*RI(2,l-t)},RM=E3.f,RB=Eg.f,RN=EP.PROPER,RU=EP.CONFIGURABLE,Rj=EZ.get,RF=EZ.set,RG="ArrayBuffer",RV="DataView",RH="prototype",RK="Wrong index",RW=S8[RG],Rq=RW,RY=Rq&&Rq[RH],RZ=S8[RV],RX=RZ&&RZ[RH],RQ=Object.prototype,RJ=S8.Array,R$=S8.RangeError,R0=kg(RP),R1=kg([].reverse),R2=RO,R5=RL,R4=function(e){return[255&e]},R3=function(e){return[255&e,e>>8&255]},R6=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},R8=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},R9=function(e){return R2(e,23,4)},R7=function(e){return R2(e,52,8)},De=function(e,t){RB(e[RH],t,{get:function(){return Rj(this)[t]}})},Dt=function(e,t,n,r){var i=Rz(n),o=Rj(e);if(i+t>o.byteLength)throw R$(RK);var a=Rj(o.buffer).bytes,s=i+o.byteOffset,u=z5(a,s,s+t);return r?u:R1(u)},Dn=function(e,t,n,r,i,o){var a=Rz(n),s=Rj(e);if(a+t>s.byteLength)throw R$(RK);for(var u=Rj(s.buffer).bytes,c=a+s.byteOffset,l=r(+i),f=0;fDa;)(Di=Do[Da++])in Rq||EA(Rq,Di,RW[Di]);RY.constructor=Rq}zI&&zy(RX)!==RQ&&zI(RX,RQ);var Ds=new RZ(new Rq(2)),Du=kg(RX.setInt8);Ds.setInt8(0,2147483648),Ds.setInt8(1,2147483649),!Ds.getInt8(0)&&Ds.getInt8(1)||AR(RX,{setInt8:function(e,t){Du(this,e,t<<24>>24)},setUint8:function(e,t){Du(this,e,t<<24>>24)}},{unsafe:!0})}else RY=(Rq=function(e){AE(this,RY);var t=Rz(e);RF(this,{bytes:R0(RJ(t),0),byteLength:t}),ke||(this.byteLength=t)})[RH],RX=(RZ=function(e,t,n){AE(this,RX),AE(e,RY);var r=Rj(e).byteLength,i=E7(t);if(i<0||i>r)throw R$("Wrong offset");if(i+(n=void 0===n?r-i:Ti(n))>r)throw R$("Wrong length");RF(this,{buffer:e,byteLength:n,byteOffset:i}),ke||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[RH],ke&&(De(Rq,"byteLength"),De(RZ,"buffer"),De(RZ,"byteLength"),De(RZ,"byteOffset")),AR(RX,{getInt8:function(e){return Dt(this,1,e)[0]<<24>>24},getUint8:function(e){return Dt(this,1,e)[0]},getInt16:function(e){var t=Dt(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Dt(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return R8(Dt(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return R8(Dt(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return R5(Dt(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return R5(Dt(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Dn(this,1,e,R4,t)},setUint8:function(e,t){Dn(this,1,e,R4,t)},setInt16:function(e,t){Dn(this,2,e,R3,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Dn(this,2,e,R3,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Dn(this,4,e,R6,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Dn(this,4,e,R6,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Dn(this,4,e,R9,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Dn(this,8,e,R7,t,arguments.length>2?arguments[2]:void 0)}});zk(Rq,RG),zk(RZ,RV);var Dc={ArrayBuffer:Rq,DataView:RZ},Dl=Math.floor,Df=Number.isInteger||function(e){return!kD(e)&&isFinite(e)&&Dl(e)===e},Dh=RangeError,Dd=function(e){var t=E7(e);if(t<0)throw Dh("The argument can't be less than 0");return t},Dp=RangeError,Dv=function(e,t){var n=Dd(e);if(n%t)throw Dp("Wrong offset");return n},Dg=kg("".slice),Dy=TypeError,Dm=function(e){var t=Ec(e,"number");if("number"==typeof t)throw Dy("Can't convert number to bigint");return BigInt(t)},D_=Rb.aTypedArrayConstructor,Db=E3.f,Dw=function(e){var t,n,r,i,o,a,s,u,c=CS(this),l=k4(e),f=arguments.length,h=f>1?arguments[1]:void 0,d=void 0!==h,p=Av(l);if(p&&!Ad(p))for(u=(s=Ay(l,p)).next,l=[];!(a=kr(u,s)).done;)l.push(a.value);for(d&&f>2&&(h=Al(h,arguments[2])),n=To(l),i="Big"===Dg(TM(r=new(D_(c))(n)),0,3),t=0;n>t;t++)o=d?h(l[t],t):l[t],r[t]=i?Dm(o):+o;return r},DS=CP.forEach,Dk=EZ.get,DE=EZ.set,DT=EZ.enforce,Dz=Eg.f,DA=S9.f,DC=Math.round,DI=S8.RangeError,Dx=Dc.ArrayBuffer,DR=Dx.prototype,DD=Dc.DataView,DP=Rb.NATIVE_ARRAY_BUFFER_VIEWS,DO=Rb.TYPED_ARRAY_TAG,DL=Rb.TypedArray,DM=Rb.TypedArrayPrototype,DB=Rb.aTypedArrayConstructor,DN=Rb.isTypedArray,DU="BYTES_PER_ELEMENT",Dj="Wrong length",DF=function(e,t){DB(e);for(var n=0,r=t.length,i=new e(r);r>n;)i[n]=t[n++];return i},DG=function(e,t){Dz(e,t,{get:function(){return Dk(this)[t]}})},DV=function(e){var t;return kO(DR,e)||"ArrayBuffer"==(t=TM(e))||"SharedArrayBuffer"==t},DH=function(e,t){return DN(e)&&!kH(t)&&t in e&&Df(+t)&&t>=0},DK=function(e,t){return DH(e,t=El(t))?kh(2,e[t]):DA(e,t)},DW=function(e,t,n){return!(DH(e,t=El(t))&&kD(n)&&k6(n,"value"))||k6(n,"get")||k6(n,"set")||n.configurable||k6(n,"writable")&&!n.writable||k6(n,"enumerable")&&!n.enumerable?Dz(e,t,n):(e[t]=n.value,e)};ke?(DP||(S9.f=DK,Eg.f=DW,DG(DM,"buffer"),DG(DM,"byteOffset"),DG(DM,"byteLength"),DG(DM,"length")),TE({target:"Object",stat:!0,forced:!DP},{getOwnPropertyDescriptor:DK,defineProperty:DW}),x9.exports=function(e,t,n){var r=e.match(/\d+$/)[0]/8,i=e+(n?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=S8[i],u=s,c=u&&u.prototype,l={},f=function(e,t){Dz(e,t,{get:function(){var e,n,i;return e=this,n=t,(i=Dk(e)).view[o](n*r+i.byteOffset,!0)},set:function(e){var i,o,s,u;return i=this,o=t,s=e,u=Dk(i),void(n&&(s=(s=DC(s))<0?0:s>255?255:255&s),u.view[a](o*r+u.byteOffset,s,!0))},enumerable:!0})};DP?RE&&(u=t(function(e,t,n,i){return AE(e,c),Ax(kD(t)?DV(t)?void 0!==i?new s(t,Dv(n,r),i):void 0!==n?new s(t,Dv(n,r)):new s(t):DN(t)?DF(u,t):kr(Dw,u,t):new s(Rz(t)),e,u)}),zI&&zI(u,DL),DS(Db(s),function(e){e in u||EA(u,e,s[e])}),u.prototype=c):(u=t(function(e,t,n,i){AE(e,c);var o,a,s,l=0,h=0;if(kD(t)){if(!DV(t))return DN(t)?DF(u,t):kr(Dw,u,t);o=t,h=Dv(n,r);var d=t.byteLength;if(void 0===i){if(d%r||(a=d-h)<0)throw DI(Dj)}else if((a=Ti(i)*r)+h>d)throw DI(Dj);s=a/r}else o=new Dx(a=(s=Rz(t))*r);for(DE(e,{buffer:o,byteOffset:h,byteLength:a,length:s,view:new DD(o)});l2?arguments[2]:void 0,s=DX((void 0===a?r:Tn(a,r))-o,r-i),u=1;for(o0;)o in n?n[i]=n[o]:DZ(n,i),i+=u,o+=u;return n},DJ=kg(DQ),D$=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("copyWithin",function(e,t){return DJ(D$(this),e,t,arguments.length>2?arguments[2]:void 0)});var D0=CP.every,D1=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("every",function(e){return D0(D1(this),e,arguments.length>1?arguments[1]:void 0)});var D2=Rb.aTypedArray,D5=Rb.exportTypedArrayMethod,D4=kg("".slice);D5("fill",function(e){var t=arguments.length;return D2(this),kr(RP,this,"Big"===D4(TM(this),0,3)?Dm(e):+e,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)},S7(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}));var D3=Rb.aTypedArrayConstructor,D6=Rb.getTypedArrayConstructor,D8=function(e){return D3(CE(e,D6(e)))},D9=function(e,t){for(var n=0,r=To(t),i=new e(r);r>n;)i[n]=t[n++];return i},D7=CP.filter,Pe=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("filter",function(e){var t,n,r=D7(Pe(this),e,arguments.length>1?arguments[1]:void 0);return t=this,n=r,D9(D8(t),n)});var Pt=CP.find,Pn=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("find",function(e){return Pt(Pn(this),e,arguments.length>1?arguments[1]:void 0)});var Pr=CP.findIndex,Pi=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("findIndex",function(e){return Pr(Pi(this),e,arguments.length>1?arguments[1]:void 0)});var Po=CP.forEach,Pa=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("forEach",function(e){Po(Pa(this),e,arguments.length>1?arguments[1]:void 0)});var Ps=Ts.includes,Pu=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("includes",function(e){return Ps(Pu(this),e,arguments.length>1?arguments[1]:void 0)});var Pc=Ts.indexOf,Pl=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("indexOf",function(e){return Pc(Pl(this),e,arguments.length>1?arguments[1]:void 0)});var Pf=Eo("iterator"),Ph=S8.Uint8Array,Pd=kg(zW.values),Pp=kg(zW.keys),Pv=kg(zW.entries),Pg=Rb.aTypedArray,Py=Rb.exportTypedArrayMethod,Pm=Ph&&Ph.prototype,P_=!S7(function(){Pm[Pf].call([1])}),Pb=!!Pm&&Pm.values&&Pm[Pf]===Pm.values&&"values"===Pm.values.name,Pw=function(){return Pd(Pg(this))};Py("entries",function(){return Pv(Pg(this))},P_),Py("keys",function(){return Pp(Pg(this))},P_),Py("values",Pw,P_||!Pb,{name:"values"}),Py(Pf,Pw,P_||!Pb,{name:"values"});var PS=Rb.aTypedArray,Pk=Rb.exportTypedArrayMethod,PE=kg([].join);Pk("join",function(e){return PE(PS(this),e)});var PT=Math.min,Pz=[].lastIndexOf,PA=!!Pz&&1/[1].lastIndexOf(1,-0)<0,PC=CO("lastIndexOf"),PI=PA||!PC?function(e){if(PA)return CJ(Pz,this,arguments)||0;var t=kz(this),n=To(t),r=n-1;for(arguments.length>1&&(r=PT(r,E7(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return -1}:Pz,Px=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return CJ(PI,Px(this),t>1?[e,arguments[1]]:[e])});var PR=CP.map,PD=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("map",function(e){return PR(PD(this),e,arguments.length>1?arguments[1]:void 0,function(e,t){return new(D8(e))(t)})});var PP=TypeError,PO=function(e){return function(t,n,r,i){kY(n);var o=k4(t),a=kS(o),s=To(o),u=e?s-1:0,c=e?-1:1;if(r<2)for(;;){if(u in a){i=a[u],u+=c;break}if(u+=c,e?u<0:s<=u)throw PP("Reduce of empty array with no initial value")}for(;e?u>=0:s>u;u+=c)u in a&&(i=n(i,a[u],u,o));return i}},PL={left:PO(!1),right:PO(!0)},PM=PL.left,PB=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return PM(PB(this),e,t,t>1?arguments[1]:void 0)});var PN=PL.right,PU=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return PN(PU(this),e,t,t>1?arguments[1]:void 0)});var Pj=Rb.aTypedArray,PF=Rb.exportTypedArrayMethod,PG=Math.floor;PF("reverse",function(){for(var e,t=Pj(this).length,n=PG(t/2),r=0;r1?arguments[1]:void 0,1),n=k4(e);if(PZ)return kr(PW,this,n,t);var r=this.length,i=To(n),o=0;if(i+t>r)throw PV("Wrong length");for(;oi;)a[i]=n[i++];return a},S7(function(){new Int8Array(1).slice()}));var PJ=CP.some,P$=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("some",function(e){return PJ(P$(this),e,arguments.length>1?arguments[1]:void 0)});var P0=Math.floor,P1=function(e,t){var n=e.length,r=P0(n/2);return n<8?P2(e,t):P5(e,P1(z5(e,0,r),t),P1(z5(e,r),t),t)},P2=function(e,t){for(var n,r,i=e.length,o=1;o0;)e[r]=e[--r];r!==o++&&(e[r]=n)}return e},P5=function(e,t,n,r){for(var i=t.length,o=n.length,a=0,s=0;a=r(t[a],n[s])?t[a++]:n[s++]:a0&&1/n<0?1:-1:e>n}))},!Oi||Or);var Oo=Rb.aTypedArray;(0,Rb.exportTypedArrayMethod)("subarray",function(e,t){var n=Oo(this),r=n.length,i=Tn(e,r);return new(D8(n))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,Ti((void 0===t?r:Tn(t,r))-i))});var Oa=S8.Int8Array,Os=Rb.aTypedArray,Ou=Rb.exportTypedArrayMethod,Oc=[].toLocaleString,Ol=!!Oa&&S7(function(){Oc.call(new Oa(1))});Ou("toLocaleString",function(){return CJ(Oc,Ol?zY(Os(this)):Os(this),zY(arguments))},S7(function(){return[1,2].toLocaleString()!=new Oa([1,2]).toLocaleString()})||!S7(function(){Oa.prototype.toLocaleString.call([1,2])}));var Of=Rb.exportTypedArrayMethod,Oh=S8.Uint8Array,Od=Oh&&Oh.prototype||{},Op=[].toString,Ov=kg([].join);S7(function(){Op.call({})})&&(Op=function(){return Ov(this)});var Og=Od.toString!=Op;Of("toString",Op,Og);var Oy=EP.EXISTS,Om=Eg.f,O_=Function.prototype,Ob=kg(O_.toString),Ow=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,OS=kg(Ow.exec);ke&&!Oy&&Om(O_,"name",{configurable:!0,get:function(){try{return OS(Ow,Ob(this))[1]}catch(e){return""}}}),uA.withResolvers||(uA.withResolvers=function(){var e={};return e.promise=new uA(function(t,n){e.resolve=t,e.reject=n}),e});var Ok=["module"],OE="danger_d_speed",OT={stall_penalty:11,switch_penalty:4,interval:1e3,startInterval:1e3,decodeUnderflowBuffer:1,decodeUnderflowMode:1,decodeUnderflowCount:1},Oz=S$(function e(t,n,r,i){var o,a=this,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{logger:function(){},openLog:!1};SQ(this,e),this._wasmPromise=new x8,this._hasDeviceInfoChanged=!0,this.uuid=pv(o=(new Date).getTime().toString(36)).call(o,4),this._defaultMaxBitrate=0,this._underflowBitrate=0,this._minBitrate=1/0,this._isCurrentHDR=!1,this.config=t,this.segment_duration=i||5e3,this.logger=function(){for(var e,t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1])||arguments[1];this._heightToDefinitionConfig=new d7,this._bitrateToDefinitionConfig=new d7,this._definitionToDefitionConfig=new d7,e&&(uC(t=e.dynamic_video_list).call(t,function(e){null===(t=n._heightToDefinitionConfig)||void 0===t||t.set(e.height||e.vheight,e);var t,r,i,o=e.bandwidth||e.bitrate;o0&&(this.module?null===(t=(n=this.module).updateBitrate)||void 0===t||t.call(n,e):this.readyPromise().then(function(){var t,n;null===(t=r.module)||void 0===t||null===(n=t.updateBitrate)||void 0===n||n.call(t,e)}))}},{key:"getPreloadBitrate",value:function(){return null}},{key:"_updateDeviceInfo",value:function(e){try{if(this._hasDeviceInfoChanged){var t,n=window.devicePixelRatio||1;null===(t=this.module)||void 0===t||t._updateDeviceInfo(this._videoWidth||Number(this.config.width),this._videoHeight||Number(this.config.height),n,e||-1)}this._hasDeviceInfoChanged=!1}catch(e){}}},{key:"readyPromise",value:function(){return this._wasmPromise}}]);Oz.SPPED_CACHE=OE;var OA=CP.map;TE({target:"Array",proto:!0,forced:!TQ("map")},{map:function(e){return OA(this,e,arguments.length>1?arguments[1]:void 0)}});var OC=[],OI=kg(OC.sort),Ox=kg(OC.push),OR=S7(function(){OC.sort(void 0)}),OD=S7(function(){OC.sort(null)}),OP=CO("sort"),OO=!S7(function(){if(kj)return kj<70;if(!(P3&&P3>3)){if(P6)return!0;if(P9)return P9<603;var e,t,n,r,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)OC.push({k:t+r,v:n})}for(OC.sort(function(e,t){return t.v-e.v}),r=0;rAj(n)?1:-1})),r=To(o),i=0;i0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n}),OG=kg("".slice),OV=kg(1..toFixed),OH=function(e,t,n){return 0===t?n:t%2==1?OH(e,t-1,n*e):OH(e*e,t/2,n)},OK=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t},OW=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=Oj(i/1e7)},Oq=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=Oj(r/t),r=r%t*1e7},OY=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var r=OU(e[t]);n=""===n?r:n+OF("0",7-r.length)+r}return n};TE({target:"Number",proto:!0,forced:S7(function(){return"0.000"!==OV(8e-5,3)||"1"!==OV(.9,0)||"1.25"!==OV(1.255,2)||"1000000000000000128"!==OV(0xde0b6b3a7640080,0)})||!S7(function(){OV({})})},{toFixed:function(e){var t,n,r,i,o=AN(this),a=E7(e),s=[0,0,0,0,0,0],u="",c="0";if(a<0||a>20)throw ON("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return OU(o);if(o<0&&(u="-",o=-o),o>1e-21){if(n=((t=OK(o*OH(2,69,1))-69)<0?o*OH(2,-t,1):o/OH(2,t,1))*4503599627370496,(t=52-t)>0){for(OW(s,0,n),r=a;r>=7;)OW(s,1e7,0),r-=7;for(OW(s,OH(10,r,1),0),r=t-1;r>=23;)Oq(s,8388608),r-=23;Oq(s,1<0?u+((i=c.length)<=a?"0."+OF("0",a-i)+c:OG(c,0,i-a)+"."+OG(c,i-a)):u+c}}),TE({target:"Object",stat:!0,forced:S7(function(){T5(1)})},{keys:function(e){return T5(k4(e))}});Dq("Int32",function(e){return function(t,n,r){return e(this,t,n,r)}});var OZ=((LI=OZ||{}).ABR_CHANGE="ABR_CHANGE_A",LI.ABR_UPDATE_SPEC="ABR_UPDATE_SPEC",LI.START_ABR="START_ABR",LI.UPDATE_AUTO_DESC="UPDATE_AUTO_DESC",LI.ABR_START_PROGRESS="ABR_START_PROGRESS",LI.MAX_BUFFER_CHANGE="MAX_BUFFER_CHANGE",LI.NEXT_SEGMENT_PREDICT="NEXT_SEGMENT_PREDICT",LI.ABR_STAT="ABR_STAT",LI.ABR_DEFINITION_REAL_CHANGE="ABR_DEFINITION_REAL_CHANGE",LI.ABR_LIMIT_BITRATE="ABR_LIMIT_BITRATE",LI),OX="__auto__",OQ={PLAYBACK_BITRATE:"avg_play_bitrate",DOWNLOAD_BITRATE:"avg_download_bitrate",DOWNLOAD_NETWORK_SPEED:"avg_download_speed",PREDICT_NETWORK_SPEED:"avg_predict_speed",BUFFER_LENGTH:"avg_buffer_length",QOE:"avg_qoe"},OJ=function(){function e(t,n,r,i,o){var a,s,u,c,l,f,h,d,p,v,g,y,m=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{logger:function(){},openLog:!1};SQ(this,e),(a=this,s=e,u=[n,r,i,o,m],s=S0(s),y=function(e,t){if(t&&("object"==ot(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(a,S1()?lW(s,u||[],S0(a).constructor):s.apply(a,u)))._bufferRange=new d7,y._sortedBufferRange=[],y._lastCheckResolutionStamp=0,y._currentDefinition=null,y._isSeeking=!1,y._waitingStartTime=0,y._stallCount=0,y._seekState=0,y._stallState=0,y._videoCurrentTime=0,y._hasStart=!1,y._isPaused=!1,y._hasAddFragment=!1,y._eventInfo={local_time_ms:0,internet_speed:0,buffer_length:0,last_bitrate:0,now_bitrate:0,play_speed:1},y._bitrateSet=[],y._generalInfo={},y._currentInAbr=!1,y._hasCalcTimelineLog=!1,y._abr_play_info={start_play_time_ms:0,is_hint:0,playback_info:{internet_speed_record:[],play_bitrate_record:[],buffer_length_record:[],play_speed_record:[],qoe_record:[],qoe_a_record:[],qoe_b_record:[],qoe_c_record:[]}},y._tickCount=0,y._fps=30,y.startTime=performance.now(),y._prevDefinitionItem=null,y._currentItem=null,y._switchCount=0,y._switchBitrate=0,y._avgStatItems={},y._qoeArgs=[0,0,0,0],y._abrUsed=-1,y._abrAlwaysOn=1,y._preloadInfo=null,y._hasLogStartInfo=!1,y._hasExecuteAbrAlgo=!1,y._lastExecuteTimeInMs=0,y._isSegmentDrive=!1,y._prevCurrentTime=-1,y._abrChangeTimeMap={},y._underFlowDecodeCount=0,y._onSegmentPredict=function(e){if(y.isCurrentInAbr&&y._isSegmentDrive){var t=Math.floor(y.downloadSpeed);e.isInitSegment||"video"!==e.mediaType||y._loopAbr(t,e.start,e.fix?e.end:0,e)}},y._onPlay=function(){y._hasStart=!0,y.logger("onplay")},y._onSeeking=function(){var e,t;y._isSeeking=!0,y.player.currentTime0)){for(var e=y.player.video||y.player.media,t=e.buffered,n=e.currentTime,r=!0,i=0;i=(y.autoBitrateOpts.decodeUnderflowCount||1),u=y._defaultMaxBitrate>0||y._underflowBitrate>0,c=1===y.autoBitrateOpts.decodeUnderflowMode&&y._isSegmentDrive;if(s&&(u||c)){var l=!0;if(c){var f=y._maxBitrate;y._maxBitrate=y._minBitrate,l=y._maxBitrate!==f}y.player.emit("ABR_LIMIT_BITRATE",{removed:l}),y._underflowBitrate>0&&(y._maxBitrate=y._underflowBitrate)}y._waitingStartTime=(new Date).getTime(),y._stallId=pS(function(){var e,t;clearTimeout(y._stallId),y._stallCount++,y._stallState=1,null===(e=y.module)||void 0===e||null===(t=e.updateWaitingState)||void 0===t||t.call(e,r)},200)}},y._onPlaying=function(){y._waitingStartTime=0,y._stallState=0,clearTimeout(y._stallId),y.checkRestart()},y._onTimeUpdate=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(y._sortedBufferRange&&0!==y._sortedBufferRange.length&&y._currentInAbr&&y.player){y._videoCurrentTime=y.player.currentTime;var n=l$();if(!(n-y._lastCheckResolutionStamp<1e3&&0!==y._lastCheckResolutionStamp)||t){y._lastCheckResolutionStamp=n;for(var r=y.player.currentTime,i=0,o=y._sortedBufferRange.length-1,a=null;i<=o;){var s=Math.floor(i+(o-i)/2),u=y._sortedBufferRange[s];if(r=u.end)){a=u;break}i=s+1}}if(a){var c,l=null===(c=y._bitrateToDefinitionConfig)||void 0===c?void 0:c.get(a.bandwidth),f=null==l?void 0:l.definition;if(y._currentDefinition===f&&!t||!f)return void(f||y.logger("error definition, mpd配置与接口配置不一致"));y._currentDefinition=f,y._prevDefinitionItem=y._currentItem,y._currentFps=l.fps,y._currentItem=l,y._emitAutoDescChange(f,!1,y._currentFps,l),y._prevDefinitionItem&&y._currentDefinition&&y._prevDefinitionItem.definition!==y._currentDefinition.definition&&y._emitDefinitionRealChange(a)}}}},y._onCanPlay=function(){y._currentInAbr&&y._currentDefinition&&(y._updateId=pS(function(){clearTimeout(y._updateId),y._emitAutoDescChange(y._currentDefinition,!1,y._currentFps,y._currentItem)},0))},y._onBufferRangeUpdate=function(e){var t;if(void 0!==e.start){null===y._currentItem&&y._onTimeUpdate(null,!0);var n,r=e.start;y._hasAddFragment=!0,y._bufferRange.set(r,e);var i=function(e){if(ux(e))return SX(e)}(n=dS(t=y._bufferRange).call(t))||function(e){if(void 0!==pd&&null!=pp(e)||null!=e["@@iterator"])return pe(e)}(n)||function(e,t){if(e){if("string"==typeof e)return SX(e,t);var n,r=pv(n=({}).toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?pe(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?SX(e,t):void 0}}(n)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();y._sortedBufferRange=lA(i).call(i,function(e,t){return e.start-t.start}),y.avgStat(OQ.DOWNLOAD_BITRATE,e.bandwidth)}},y._onReplay=function(){y.checkRestart()},y._onEnded=function(){y.stop()},y._onError=function(){y.stop()},y.start=function(){if(y.logger("start"),y._isPaused=!1,!y._hasCalcTimelineLog){var e=1===Math.floor(100*Math.random());y._abr_play_info.is_hint=e?1:0}y._hasCalcTimelineLog=!0,y._loop()},y.stop=function(){!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])&&(y._abrAlwaysOn=-1),clearTimeout(y.timerId),y._isPaused=!0,y.logger("stop")},y.logger("constructor",n,r,i,o,y.bitrate),y.player=t,y.isOpenAutoDefi=!!y.autoBitrateOpts.isOpenAutoDefi,y._isSegmentDrive=1===y.autoBitrateOpts.abrDriveMode,y.onPlayRateChange=yT(d=y._onPlayrateChange).call(d,y),y._onWinSizeChange=(c=yT(p=y.onWinElemSizeChange).call(p,y),l=1e3,f=!1,function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r0&&void 0!==arguments[0]&&arguments[0];this._onTimeUpdate(null,e)}},{key:"_onMaxBufferChange",value:function(e){var t=e.videoCacheTime,n=e.audioCacheTime;this._maxCacheTimeAudio=n,this._maxCacheTimeVideo=t}},{key:"_emitAutoDescChange",value:function(e,t,n,r){var i;this.logger("[ABR],emitAutoDescChange, definition, ",e,",item,",r,",pre_item,",this._prevDefinitionItem),null===(i=this.player)||void 0===i||i.emit("UPDATE_AUTO_DESC",{definition:e,reset:t,fps:n,item:r,pre_item:this._prevDefinitionItem})}},{key:"_emitDefinitionRealChange",value:function(e){var t,n=0,r=e.start;this._abrChangeTimeMap[r]&&(this._abrChangeTimeMap[r]=0,delete this._abrChangeTimeMap[r],n=1),null===(t=this.player)||void 0===t||t.emit("ABR_DEFINITION_REAL_CHANGE",{orgDefinition:this._prevDefinitionItem.definition,orgBitrate:this._prevDefinitionItem.bitrate||this._prevDefinitionItem.bandwidth,currentDefinition:this._currentItem.definition,currentBitrate:this._currentItem.bitrate||this._currentItem.bandwidth,abrChange:n})}},{key:"_onPlayrateChange",value:function(){this.module&&this.updateBufferInfo()}},{key:"_execDecision",value:function(){if(!this.isOpenAutoDefi)return 0;var e=0;try{this.logger("exec decision"),this.updateSwitchInfo(),this.transformMediaInfo(),this.updateDeviceInfo();var t=!!this.autoBitrateOpts.isPlayAutoDefi;if(this.isOpenAutoDefi&&t){this._abrUsed=1;var n=this._getDefaultSpeed(this.player);this._isSegmentDrive||(e=this._loopAbr(n)),this.start(),this._changeLoopInterval(),this.logger("time start progress",(new Date).getTime()),this.logger("time costTime",performance.now()-this.startTime)}}catch(e){this.logger("decision error",e),this.logger("time costTime err",performance.now()-this.startTime)}return e}},{key:"_changeLoopInterval",value:function(){var e=this;this.startTimer&&(clearTimeout(this.startTimer),this.startTimer=null),this.startTimer=pS(function(){e._loopInterval=e.interval,e.startTimer&&clearTimeout(e.startTimer),e.logger("interval change")},5e3)}},{key:"_loop",value:function(){var e=this;this._isPaused||this._isSegmentDrive||(clearTimeout(this.timerId),this.timerId=pS(function(){var t,n=e.player,r=e.config;if(e._hasStart&&null!==(t=r.autoBitrateOpts)&&void 0!==t&&t.stillRunWhenPaused||!n.paused||!n.config.autoplay&&!e._hasStart){var i=e._hasAddFragment?void 0:e._getDefaultSpeed(n);e._loopAbr(i)}e._loop()},this._loopInterval))}},{key:"checkRestart",value:function(){var e;null!==(e=this.config.autoBitrateOpts)&&void 0!==e&&e.autoRestartAbr&&this._currentInAbr&&this._isPaused&&this.start()}},{key:"updateDeviceInfo",value:function(){try{if(this.fpsDetection){var e=this.fpsDetection.fps;e!==this._fps&&(this._fps=e,this._hasDeviceInfoChanged=!0)}this._updateDeviceInfo(this._fps)}catch(e){}}},{key:"updateBufferInfo",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.player.video||this.player.media,o=i.playbackRate,a=i.currentTime,s=this.bufferLength;r>0&&this.player&&(s=r-a);var u=e||Math.floor(this.player.downloadSpeed)||0,c=this.player._core||this.player;c&&c.runtime&&(u=c.runtime.speedInfo.averageKBps),this._tickCount<5&&0===u&&(u=this._getDefaultSpeed(this.player),this.logger("initSpeed fix"));var l=-1===this._maxBitrate?this._defaultMaxBitrate:this._maxBitrate;return this.logger("downloadSpeed:",u,"buffer:",s,"maxCacheTimeAudio:",this._maxCacheTimeAudio,"maxCacheVideoTime",this._maxCacheTimeVideo,"seekState",this._seekState,"stallState",this._stallState,"segmentBufferStart",n,"segmentBufferEnd",r),null===(t=this.module)||void 0===t||t._updateBufferInfo(o,this._maxCacheTimeAudio,this._maxCacheTimeVideo,s,this._isSegmentDrive?r:s,u,this._seekState,a,this._stallState,l),this._seekState=0,this._eventInfo={internet_speed:u,buffer_length:s,last_bitrate:this.bitrate,play_speed:o},this.logger("playRate:",o,"buff:",s,"downloadSpeed:",u),{buffer:s,downloadSpeed:u}}},{key:"updateSwitchInfo",value:function(){var e,t,n,r,i=(new Date).getTime();this._openTimeMs=i,this._abr_play_info.start_play_time_ms=i;var o=(null===(n=this.player)||void 0===n?void 0:n.config.preloadTime)||50,a=(t=(e=i).toString(16)).length<=8?{high:0,low:e}:{high:hl(t.substr(0,t.length-8),16),low:hl(t.substr(t.length-8),16)},s=this.autoBitrateOpts.noStallCheckTime||5,u=this.openLog;this.logger("openTime:",i,"this.logger",u),null===(r=this.module)||void 0===r||r._updateSwitchInfo(a.low,a.high,s,u,this.stall_penalty,this.switch_penalty);var c=this._mediaList.video,l=lD(c).call(c,function(e){var t=e.bandwidth,n=e.bitrate;return t||n});this._bitrateSet=lD(l).call(l,function(e,t){return{bitrate:e,codecs:c[t].codecs||c[t].codec_type||""}}),this._generalInfo={max_cache_time:o,bitrate_set:this._bitrateSet,segment_duration:this.segment_duration,preload_info:{},startup_info:{}}}},{key:"updatePreloadCacheInfo",value:function(e){try{this._preloadInfo=e,this.logger("update preloadInfo",e),e&&e.item_num!==e.items.length&&(this.logger("preloadInfo invalid"),this._preloadInfo=null)}catch(e){this.logger("updatePreloadCacheInfo",e),this._preloadInfo=null}}},{key:"updatePreloadLogInfo",value:function(e){this._generalInfo.preload_info=e||{}}},{key:"_loopAbr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this._tickCount++;var i=-1,o=[];if(!this.module||!this.player)return this.bitrate;try{var a,s=(new Date).getTime(),u=this.player;this.updateDeviceInfo();var c=this.updateBufferInfo(e,t,n),l=c.downloadSpeed;if(c.buffer,this.module.updateDropFrame&&u.video.getVideoPlaybackQuality){var f,h=u.video.getVideoPlaybackQuality(),d=h.droppedVideoFrames/h.totalVideoFrames;null===(f=this.module)||void 0===f||f.updateDropFrame(d)}i=this.module._getPredictedBitrate(this.bitrate,this._abrMethod);for(var p=0;p<7;p++)o.push(this.module.HEAP32[i/Int32Array.BYTES_PER_ELEMENT+p]);var v=o[0],g=1===o[1];this._eventInfo.now_bitrate=v,this._eventInfo.local_time_ms=(new Date).getTime();var y=0;if(v!==this.bitrate&&0!==v||this.autoBitrateOpts.reportVerboseAbrLog){var m=this.player.currentTime;if(this.module.getStat){var _=this.module.getStat();u.emit("ABR_STAT",S5(S5({v_time:m,diff_current_position:-1===this._prevCurrentTime?0:m-this._prevCurrentTime,net_speed:8*l,costTime:(new Date).getTime()-s,download_time:null==r?void 0:r.costTime},_),{},{gop_size:null==r?void 0:r.gopSize,audio_buffer:null==r?void 0:r.audioBuffer})),this._abrChangeTimeMap[_.download_position]=1}this._prevCurrentTime=m}if(v!==this.bitrate&&0!==v){var b,w,S=this.bitrate;y=Math.abs(S-v);for(var k=[],E=(u.media||u.video).buffered,T=0;T-1&&this.module._free(i)}return this.bitrate}},{key:"destroy",value:function(){var e,t,n=this;this.stop(),uC(e=this.listeners).call(e,function(e){var t,r=e.evt,i=e.handler;null===(t=n.player)||void 0===t||t.off(r,i)}),this._maxBitrate=-1,this.player=null,this._heightToDefinitionConfig=null,this._bitrateToDefinitionConfig=null,this._bitrateToDefinitionConfig=null,this._bufferRange.clear(),this._sortedBufferRange=[],this.module=null,clearTimeout(this._stallId),clearTimeout(this._updateId),this.startTimer&&clearTimeout(this.startTimer),window.removeEventListener("resize",this._onWinSizeChange),null===(t=this.fpsDetection)||void 0===t||t.stop()}},{key:"eventInfo",get:function(){return this._eventInfo}},{key:"generalInfo",get:function(){return this._generalInfo}},{key:"bufferLength",get:function(){var e,t,n=(null===(e=this.player)||void 0===e?void 0:e.getBufferedRange())||[],r=((null===(t=this.player)||void 0===t?void 0:t.video)||{currentTime:0}).currentTime;return hx(Math.max(0,n[1]-Math.max(n[0],r)).toFixed(2))}},{key:"downloadSpeed",get:function(){var e=Math.floor(this.player.downloadSpeed)||0,t=this.player._core||this.player;return t&&t.runtime&&(e=t.runtime.speedInfo.averageKBps),e}},{key:"nowBitrate",get:function(){return this.bitrate}},{key:"openTimeMs",get:function(){return this._openTimeMs}},{key:"isCurrentInAbr",get:function(){return this._currentInAbr},set:function(e){this._currentInAbr=e}},{key:"isCurrentHDR",get:function(){return this._isCurrentHDR},set:function(e){this._isCurrentHDR=e}},{key:"onAbrLoop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(this._qoeArgs=r,this._currentItem&&this.avgStat(OQ.PLAYBACK_BITRATE,this._currentItem.bitrate),this.avgStat(OQ.DOWNLOAD_NETWORK_SPEED,1e3*e*8),this.avgStat(OQ.PREDICT_NETWORK_SPEED,t),this.avgStat(OQ.BUFFER_LENGTH,this.bufferLength),this.avgStat(OQ.QOE,this.getQoeRelValue(0)),n>0&&(this._switchCount++,this._switchBitrate+=n),this._abr_play_info.is_hint){var i=((new Date).getTime()-this.openTimeMs)/1e3;i=hx(i.toFixed(2));var o=this.player.video||this.player.media,a=(null==o?void 0:o.playbackRate)||1;this._abr_play_info.playback_info.internet_speed_record.push([i,this.downloadSpeed]),this._abr_play_info.playback_info.play_bitrate_record.push([i,this.nowBitrate]),this._abr_play_info.playback_info.buffer_length_record.push([i,this.bufferLength]),this._abr_play_info.playback_info.play_speed_record.push([i,a||-1]),this._abr_play_info.playback_info.qoe_record.push([i,this.getQoeRelValue(0)]),this._abr_play_info.playback_info.qoe_a_record.push([i,this.getQoeRelValue(1)]),this._abr_play_info.playback_info.qoe_b_record.push([i,this.getQoeRelValue(2)]),this._abr_play_info.playback_info.qoe_c_record.push([i,this.getQoeRelValue(3)])}}},{key:"getQoeRelValue",value:function(e){return this._qoeArgs[e]/100}},{key:"avgStat",value:function(e,t){var n=this._avgStatItems[e];n&&n.add(t)}},{key:"getAbrPlayInfo",value:function(){return this._abr_play_info}},{key:"updateAbrMethod",value:function(e){this._abrMethod=e}},{key:"getAbrMethod",value:function(){return this._abrMethod}},{key:"updateSegmentDuration",value:function(e){var t;this.segment_duration=e,null!==(t=this.module)&&void 0!==t&&t.updateSegmentDuration&&this.module.updateSegmentDuration(e)}},{key:"getAbrVVStats",value:function(){for(var e={},t=uI(OQ),n=0;n0)try{e.curDefinition.audioDefinition=lC(o).call(o,function(e){return e.file_id===r})[0]}catch(e){}}}},{key:"_updateAutoDefiDesc",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=this.player,o=(this.config.autoBitrateOpts||{}).autoDefiText||"auto";if(i.emit("ABR_AUTO_DESC_CHANGE",o,t?void 0:e,n,r),!t){var a,s=r?r.fps:void 0;SU(i,"currentDefitionFromPlayer",{definition:"自动 ".concat(e),fps:s,item:r}),null!==(a=this._abrInstance)&&void 0!==a&&a.isCurrentInAbr||(SU(i,"curDefinition",oJ({},r)),this._setAudioDefinition())}}}],[{key:"pluginName",get:function(){return"VeStrategyAbrPlugin"}},{key:"defaultConfig",get:function(){return{startWhenAuto:!1}}}])}(),O5=function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[t],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,lZ),uz(e,[{key:"getRecommendation",value:function(){var e={plugins:[],pluginConfiguration:{},result:{enable:!0}};return this.config.enable&&(e.plugins=[O2],e.pluginConfiguration=oX({},O2.pluginName,oJ({},this.config))),e.result=oJ(oJ({},this.config),{},{enable:!0}),e}}])}();oX(O5,"strategyName",l5.abr),oX(O5,"strategyPriority",l3.abr);var O4=new l9("VeStrategy-adapt-range"),O3=function(){function e(t){var n,r,i,o,a;return uE(this,e),i=this,o=e,a=[t],o=lV(o),r=lP(i,lG()?lW(o,a||[],lV(i).constructor):o.apply(i,a)),O4.update(null===(n=t.ctx.dataCenter)||void 0===n||null===(n=n.getAppConfig())||void 0===n?void 0:n.log),O4.info("VeStrategyAdaptRangeInit"),r}return lK(e,lZ),uz(e,[{key:"getRecommendation",value:function(e){if(!this.config||!1===this.config.enable)return{plugins:[],pluginConfiguration:{},result:{enable:!1}};var t,n={plugins:[],pluginConfiguration:{},result:{}};if(null!=e&&e.vtype&&fl(t=[l2.DASH,l2.MP4]).call(t,e.vtype)){var r=this.adaptRange(e);r&&(n.result=r)}return n}},{key:"adaptRange",value:function(e){if(null==e||!e.vtype||!fl(t=[l2.DASH,l2.MP4]).call(t,e.vtype))return O4.info("adaptRangeNotEnableOrIllegalVType",e),null;var t,n=this.ctx.featureCenter.getFeatureList(),r=this.config[e.vtype]||{};if(e.videoLabel&&r[e.videoLabel]&&(r=oJ(oJ({},r),r[e.videoLabel])),this.config.whiteList){var i=dz(this.config.whiteList,{browserVersion:n.browserVersion,CPUCore:n.cpuCore,browserName:n.browserName,vtype:e.vtype,duration:e.duration});O4.info("adaptRangeKvMatch",i),i&&(r=oJ(oJ({},r),i))}return r}}])}();oX(O3,"strategyName",l5.adaptRange),oX(O3,"strategyPriority",l3.adaptRange);var O6=["cdn"],O8=0,O9=function(){function e(){uE(this,e);for(var t,n,r,i,o,a=arguments.length,s=Array(a),u=0;u3&&void 0!==arguments[3]?arguments[3]:"cdn";e.speedListCache&&e.speedListCache[o]&&(e.speedListCache[o].length>=n.saveSpeedMax&&e.speedListCache[o].shift(),e.speedListCache[o].push({speed:t,bytes:r,time:i}),n._updateSpeed(o))}),oX(n,"_onChannelMessage",function(e){if("speedSample"===e.data.type){var t=e.data.data,r=t.speed,i=t.bytes,o=t.timestamp,a=t.type;n.appendList(8*r,i,o,a||"cdn")}}),oX(n,"_onChannelError",function(e){}),n}return lK(e,lq),uz(e,[{key:"saveSpeedMax",get:function(){var e,t=null===(e=this.config)||void 0===e?void 0:e.saveSpeedMax;return"number"==typeof t?t:20}},{key:"avgSpeed",get:function(){return O8},set:function(e){O8=e}},{key:"afterPlayerInit",value:function(){var e=this.player._core;"undefined"!=typeof BroadcastChannel&&(this._channel=new BroadcastChannel(e._cfg.broadcastChannelName),this._channel.addEventListener("message",this._onChannelMessage),this._channel.addEventListener("error",this._onChannelError));var t=this.config.addSpeedTypeList;if(ux(t)){var n,r=i9(new ls(ll(n=[]).call(n,O6,i9(t))));O6.length=0,O6.push.apply(O6,i9(r))}this._initSpeedList()}},{key:"destroy",value:function(){this._channel&&(this._channel.removeEventListener("message",this._onChannelMessage),this._channel.removeEventListener("error",this._onChannelError),this._channel.close(),this._channel=void 0)}},{key:"getSpeedName",value:function(e,t){return e+"Speed"+t.toUpperCase()}},{key:"_updateSpeed",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cdn",n=e.getAvgSpeedKbs(t),r=this.player;if(r){var i=!1;if("cdn"===t)this.avgSpeed&&n===this.avgSpeed||(this.avgSpeed=n,i=!0);else{var o=this.getSpeedName("avg",t);this[o]&&n===this[o]||(this[o]=n,i=!0)}i&&r.emit("download_speed_change",{type:t,speed:n})}}},{key:"_initSpeedList",value:function(){uC(O6).call(O6,function(t){e.speedListCache[t]||(e.speedListCache[t]=[])})}}],[{key:"pluginName",get:function(){return"testspeed"}},{key:"speedSampleList",get:function(){return e.speedListCache}},{key:"getAvgSpeedKbs",value:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cdn";if(!e.speedListCache||!e.speedListCache[n]||e.speedListCache[n].length<=0)return -1;var r=0;return lD(t=e.speedListCache[n]).call(t,function(e){r+=e.speed}),Math.floor(r/e.speedListCache[n].length)}},{key:"getWeightedSpeedKbs",value:function(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cdn",r=-1;if(!e.speedListCache||!e.speedListCache[n]||e.speedListCache[n].length<=0)return r;var i=[];uC(t=e.speedListCache[n]).call(t,function(e){i.push(e)}),lA(i).call(i,function(e,t){return e.speed-t.speed});for(var o=i.length,a=0,s=0;s=i._xgOrgBitrate){n=r;break}}return n<0?null:e[n]}(e,t):function(e,t){if(!e)return null;var n=1/0,r=null;return uC(e).call(e,function(e){var i=Math.abs(e._xgOrgBitrate-t);n>i&&(r=e,n=i)}),r||null}(e,t)}function Ln(e,t){return uC(e).call(e,function(e){e[t]?e._xgOrgBitrate=e[t]:e.bitrate&&(e._xgOrgBitrate=e.bitrate)}),e}var Lr=uz(function e(t){uE(this,e),oX(this,"analysis",void 0),oX(this,"_config",void 0),this._config=uM({},t)},[{key:"select",value:function(e,t,n){if(e.length<=1)return e[0];var r,i=n.autoBitrateParams,o=i.paramA,a=i.paramB,s=i.paramC,u=i.paramD;this._config=uM({},n);var c=this._config.defaultBitrate,l=t<=0||!t?c:o*Math.pow(t,3)+a*Math.pow(t,2)+s*t+u;return(r=Lt(e,l,n.selectAlgType))||(r=e[e.length-1]),r._targetBitrate=l,r}}]),Li=uz(function e(t){var n=this;uE(this,e),oX(this,"player",void 0),oX(this,"_timer",null),oX(this,"_prevPauseTime",0),oX(this,"_prevStallTime",0),oX(this,"_prevCurrentTime",0),oX(this,"_info",void 0),oX(this,"_onPlay",function(){n._calcPausedTime()}),oX(this,"_onPause",function(){n._prevPauseTime=l$()}),oX(this,"_onEnded",function(){!n._info.downloadDuration&&n._info.canPlayTime&&(n._info.downloadDuration=(l$()-n._info.canPlayTime)/1e3),n.disable()}),oX(this,"_canPlay",function(){n._info.canPlayTime=l$();var e,t=null===(e=n.player)||void 0===e?void 0:e.buffered;t&&t.length&&(n._info.startBufferTime=t.end(t.length-1))}),oX(this,"_onProgress",function(){var e=n.player;if(e){var t=e.buffered;n._info.canPlayTime&&t&&t.length&&t.end(t.length-1)+.8>e.duration&&(n._info.downloadDuration=(l$()-n._info.canPlayTime)/1e3)}}),oX(this,"_onTick",function(){var e=n.player;if(e){n._timer=pS(n._onTick,500);var t=e.currentTime;(!e.paused||e.ended||0===e.playbackRate||0===e.readyState)&&(n._prevCurrentTime===t?n._prevStallTime||(n._prevStallTime=l$()):n._calcStallTime()),n._prevCurrentTime=t}}),this.player=t,this.resetInfo(),this.enable()},[{key:"isStalling",get:function(){return!!this._prevStallTime}},{key:"destroy",value:function(){this.disable(),this.player=void 0}},{key:"enable",value:function(){this.disable();var e=this.player;e&&(e.on("play",this._onPlay),e.on("pause",this._onPause),e.on("canplay",this._canPlay),e.on("progress",this._onProgress),e.on("ended",this._onEnded),this._timer=pS(this._onTick,500))}},{key:"disable",value:function(){this._timer&&(clearTimeout(this._timer),this._timer=null),this.resetInfo();var e=this.player;e&&(e.off("play",this._onPlay),e.off("pause",this._onPause),e.off("canplay",this._canPlay),e.off("progress",this._onProgress),e.off("ended",this._onEnded))}},{key:"endPlay",value:function(){if(this.player){var e=this.player.buffered;if(e.length)try{this._info.endBufferTime=e.end(e.length-1)}catch(e){}this._info.leaveWithBlock=this.isStalling,this._calcPausedTime(),this._calcStallTime(),!this._info.downloadDuration&&this._info.canPlayTime&&(this._info.downloadDuration=(l$()-this._info.canPlayTime)/1e3)}}},{key:"getInfo",value:function(){return this._info}},{key:"resetInfo",value:function(){this._prevPauseTime=0,this._prevStallTime=0,this._prevCurrentTime=0,this._info={pausedTime:0,stalledTime:0,downloadDuration:0,startBufferTime:0,endBufferTime:0,canPlayTime:0,leaveWithBlock:!1}}},{key:"_calcStallTime",value:function(){this._prevStallTime&&(this._info.stalledTime+=(l$()-this._prevStallTime)/1e3,this._prevStallTime=0)}},{key:"_calcPausedTime",value:function(){this._prevPauseTime&&(this._info.pausedTime+=(l$()-this._prevPauseTime)/1e3,this._prevPauseTime=0)}}]),Lo=uz(function e(){uE(this,e),oX(this,"_queue",[]),oX(this,"_current",{}),oX(this,"_config",{defaultTargetBitrate:1e6,paramBf:1e-6,paramBp:1e-6,paramUpperBl:1.2,paramUpper:1.2,paramLower:.5,slidingWindowWeight:"time",slidingWindowType:"by_weight",slidingWindowWeightThreshold:1e3,slidingWindowCountThreshold:10,paramVlLower:.8,paramVlUpper:.9,paramVl1:.8,paramVl2:1e3,bitrateLower:1e5,bitrateUpper:1e6,slidingWindowExtraction:"weighted_median"})},[{key:"queue",get:function(){return this._queue}},{key:"setConfig",value:function(e){uM(this._config,e||{})}},{key:"setCurrent",value:function(e){uM(this._current,e)}},{key:"getCurrent",value:function(){return this._current}},{key:"resetCurrent",value:function(){this._current={}}},{key:"calcAndReset",value:function(){var e=this._current,t=e.startBufferTime,n=e.duration,r=e.endBufferTime,i=e.leaveWithBlock,o=e.stalledTime,a=e.pausedTime,s=e.downloadDuration,u=e.bitrate;if(n&&u&&r){var c,l,f,h=this._config,d=h.paramBf,p=h.paramBp,v=h.paramUpperBl,g=h.paramUpper,y=h.slidingWindowWeight,m=h.slidingWindowType,_=h.slidingWindowWeightThreshold,b=h.slidingWindowCountThreshold,w=1+((r-t)*d-(o+a)*p)/s;i&&(w=Math.min(w,v));var S=u*Math.max(g,w),k=0;if(k="time"===y?Math.min(s,n+o):Math.min(s,n)*u,this._queue.push([S,k,this._current]),"by_weight"===m){this._queue=pv(c=this._queue).call(c,-30);for(var E=fJ(l=this._queue).call(l,function(e,t){return e+t[1]},0)-_;E>0;){var T=this._queue.shift();if(!T)break;if(T[1]>E){T[1]-=E,this._queue.unshift(T);break}E-=T[1]}}else this._queue=pv(f=this._queue).call(f,-b);this.resetCurrent()}else this.resetCurrent()}},{key:"getDefaultBitrate",value:function(e){if(!e||0===e.length)return 0;for(var t=this._config.defaultTargetBitrate||1e6,n=0,r=0;r=n&&(n=e[r]._xgOrgBitrate);return n||(n=e[e.length-1]._xgOrgBitrate),n}},{key:"getTargetBitrate",value:function(e,t){if(!this._queue.length||!e)return 0;var n,r=this._config,i=r.paramVlLower,o=r.paramVlUpper,a=r.paramVl1,s=r.paramVl2,u=r.bitrateLower,c=r.bitrateUpper,l=r.slidingWindowExtraction,f=0,h=fJ(d=this._queue).call(d,function(e,t){return e+t[1]},0);if("weighted_median"===l){var d,p,v=h/2,g=1/0,y=0;uC(p=this._queue).call(p,function(e){(y=Math.abs(v-e[1]))=i[0]&&e._xgOrgBitrate<=i[1]})).call(s,function(e,t){return"number"==typeof t._xgOrgBitrate&&"number"==typeof e._xgOrgBitrate?t._xgOrgBitrate-e._xgOrgBitrate:0});if(!a.length){var s,u,c=1/0;uC(e).call(e,function(e){var t=Math.abs(e._xgOrgBitrate-o);t=(null===(r=e[e.length-1])||void 0===r?void 0:r._xgOrgBitrate)&&(i=0),e[i]._xgOrgBitrate<=t._xgOrgBitrate?1:0}(a,l)),l}},{key:"selector",get:function(){var e=this.config.mode;return this._selectorMap[e]||this._selectorMap.simple}},{key:"getTargetBitrate",value:function(e,t){var n=this.selector;if("getTargetBitrate"in n)return n.getTargetBitrate(e,t)}},{key:"addSelect",value:function(e,t){var n=e||t.name;this._selectorMap[n]=t}},{key:"destroy",value:function(){var e,t=this._selectorMap;uC(e=uI(t)).call(e,function(e){var n=t[e];"destroy"in n&&"function"==typeof n.destroy&&n.destroy()})}}],[{key:"defaultConfig",get:function(){return{disabled:!1,paramBf:.3,paramBp:.5,paramUpper:1.5,paramLower:.6,paramUpperBl:.7,paramVl1:.7,paramVl2:1e3,paramVlUpper:.9,paramVlLower:.8,bitrateUpper:2e6,bitrateLower:2e5,slidingWindowType:"by_weight",slidingWindowWeight:"size",slidingWindowWeightThreshold:3e5,slidingWindowCountThreshold:30,slidingWindowExtraction:"weighted_median",bitrateRange:[2e5,25e5],defaultBitrate:1e6,defaultTargetBitrate:1e6,autoBitrateParams:{paramA:0,paramB:404330129e-17,paramC:.0164405979,paramD:225511.28,minBitrate:2e5},mSpeedRecordValidThreshold:2,mode:"simple",needCheckDuration:!0,overscore:{isOpen:!1,type:"filter",enable266:!0,filterKey:"definition",filterList:[],scoreMultiple:2},bitrateKey:"bitrate"}}},{key:"MaxQueueCapacity",get:function(){return Lc},set:function(e){Lc=e}}]),Ld=uz(function e(){var t,n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};uE(this,e),oX(this,"config",{size:30,severeBlockDuration:1500,slightBlockDuration:100,highBitrateRatio:1.5,lowBitrateRatio:.8,highLadderSelectedCnt:1,lowLadderSelectedCnt:1,blockSumMaxTime:6e5}),oX(this,"timerId",null),oX(this,"_tBQueue",[]),oX(this,"_sBQueue",[]),oX(this,"_blockQueue",[]),oX(this,"_info",{blockDurationSum:0,currentBlockDur:0,targetBitrateAvg:0,selectedBitrateAvg:0,higherSelectedCnt:0,lowerSelectedCnt:0}),lD(t=uI(r)).call(t,function(e){n.config[e]=r[e]||0}),this.setTimer()},[{key:"targetBitRate",set:function(e){var t;if(e&&"number"==typeof e){this._tBQueue.push(hl("".concat(e),10)),this._tBQueue.length>this.config.size&&this._tBQueue.shift();var n=0;lD(t=this._tBQueue).call(t,function(e){n+=e}),this._info.targetBitrateAvg=n/this._tBQueue.length}}},{key:"selectBitRate",set:function(e){var t;if(e&&"number"==typeof e){this._sBQueue.push(e),this._sBQueue.length>this.config.size&&this._sBQueue.shift();var n=0;lD(t=this._sBQueue).call(t,function(e){n+=e}),this._info.selectedBitrateAvg=n/this._sBQueue.length}}},{key:"blockDuration",set:function(e){this._blockQueue.push(e),this._blockQueue.length>this.config.size&&this._blockQueue.shift();var t,n=0;lD(t=this._blockQueue).call(t,function(e){n+=e}),this._info.blockDurationSum=n}},{key:"currentBlockDur",set:function(e){this._info.currentBlockDur+=e}},{key:"updateBitRateInfo",value:function(e,t){e&&t&&(e>t?this._info.higherSelectedCnt++:ee.severeBlockDuration&&(t.selectedBitrateAvg>t.targetBitrateAvg*e.highBitrateRatio&&t.higherSelectedCnt>=e.highLadderSelectedCnt||t.currentBlockDur>e.severeBlockDuration)?1:t.blockDurationSum=e.lowLadderSelectedCnt?2:0}},{key:"setConfig",value:function(){var e,t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};lD(e=uI(n)).call(e,function(e){t.config[e]=n[e]||0})}},{key:"resetCurrent",value:function(){this._info.currentBlockDur=0}},{key:"setTimer",value:function(){var e=this;this._blockQueue=[],this._tBQueue=[],this._sBQueue=[],this._info={blockDurationSum:0,currentBlockDur:0,targetBitrateAvg:0,selectedBitrateAvg:0,higherSelectedCnt:0,lowerSelectedCnt:0},this.timerId&&(clearTimeout(this.timerId),this.timerId=null),this.timerId=pS(function(){e.setTimer()},this.config.blockSumMaxTime)}}]),Lp=new Ld({}),Lv=null,Lg=null,Ly={needCheckDuration:!0};function Lm(e){var t=0,n=e.speedAlgoType;return n&&n!==Lf.AVG?n===Lf.WEIGHT&&(t=O9.getWeightedSpeedKbs()):t=O9.getAvgSpeedKbs(),t}function L_(e,t){var n,r,i=t.userDefinition,o=t.config,a=t.bitrateAdapter,s=new Le;if(y=[],uC(g=e).call(g,function(e){e.mediaType&&"video"!==e.mediaType||y.push(e)}),e=y,o.disabled||!e||e.length<1)return null;var u=Ln(e,o.bitrateKey),c=lA(u).call(u,function(e,t){return"number"==typeof t._xgOrgBitrate&&"number"==typeof e._xgOrgBitrate?t._xgOrgBitrate-e._xgOrgBitrate:0}),l=1024*Lm(o),f=null;if(a||(Lv||(Lv=new Lh({config:o})),a=Lv),a.analysis=s,c&&c.length&&(f=a.select(c,o.mode,l))&&o.mode===Ll.BANDWIDTH){var h=f._targetBitrate||f._xgOrgBitrate,d=null;if(!l||l<0||1!==o.mixFactor){var p=uM({},o);p.mode=Ll.BUFFER_INFO;var v=new Lh({config:p});"number"==typeof l&&l>0&&(v.speed=l),d=null==v?void 0:v.select(u,p.mode,l)}if(d){var g,y,m,_=d._targetBitrate||d._xgOrgBitrate;(f=Lt(u,m=!l||l<0?_:o&&"number"==typeof o.mixFactor&&o.mixFactor>=0&&o.mixFactor<=1?h*o.mixFactor+_*(1-o.mixFactor):o&&"number"==typeof o.mixFactor&&o.mixFactor>1?Math.max(h,_):Math.min(h,_),o.selectAlgType))||(f=e[e.length-1]),f._targetBitrate=m}}f&&(f.type=SF.BITRATE_ADAPTER);var b=(null===(n=f)||void 0===n?void 0:n.duration)||0,w=null===(r=a)||void 0===r?void 0:r.getTargetBitrate(b,e);if(w&&(Lp.targetBitRate=w),i){var S=Lb.getUserSelectBitrate(c,i);S&&(Lp.selectBitRate=S._xgOrgBitrate,Lp.updateBitRateInfo(S._xgOrgBitrate,w),f=S,s.type=O7.USER_SELECT)}if(o.overscore&&o.overscore.isOpen&&f){var k=function(e,t,n){var r=n.isOpen,i=n.enable266,o=n.filterKey,a=n.filterList,s=n.scoreMultiple,u=n.type;if(!r)return e;var c=null;return"filter"===u?c=function(e,t,n,r){var i=null;if(uC(n).call(n,function(n){n.source===t[e]&&(i=n)}),!i)return null;for(var o=null,a=function(t){var n;if(uC(n=i.target).call(n,function(n){r[t][e]===n&&(o=r[t])}),o)return 1},s=0;s-1&&rn.length-1?n.length-1:r+e]:null}(s,e,t)),c&&(!c.isH266||i)?(c.type=SF.OVER_SCORE,c.fromType=e.type,c.orgDefinition=e.definition,c):e}(f,c,o.overscore);s.type=O7.SR,f=k}return f&&(f.chosenType=s.type,f.chosenReason=s.reason),f}var Lb=function(){function e(t){var n,r,i,o;return uE(this,e),oX((r=this,i=e,o=[t],i=lV(i),n=lP(r,lG()?lW(i,o||[],lV(r).constructor):i.apply(r,o))),"bitRateAdapter",void 0),oX(n,"curBitRate",void 0),oX(n,"_onXLog",function(e){"waitingEnd"===e.eventType&&0===e.type&&(Lp.blockDuration=e.costTime,n.player.isUserActive&&(Lp.currentBlockDur=e.costTime))}),e.defaultConfig=n.config,n}return lK(e,lq),uz(e,[{key:"detectDefInfo",get:function(){return Lp}},{key:"beforeDestroy",value:function(){this.destroy()}},{key:"destroy",value:function(){var e,t;null===(e=this.player)||void 0===e||e.off("xglog",this._onXLog),null===(t=this.bitRateAdapter)||void 0===t||t.destroy(),this.bitRateAdapter=void 0,null==Lp||Lp.resetCurrent()}},{key:"beforePlayerInit",value:function(){var e=this.player,t=this.config,n=t.multiFactors;(null==n?void 0:n.length)>0&&this.updateParamsByFactor(n),this._bindEvent(),this.bitRateAdapter=new Lh({config:t},e),Lv||(Lv=new Lh({config:t})),Lp.setConfig(t.detectConfig||{}),Lp.resetCurrent();var r=this.getInitBitrate();this.curBitRate=r,SB(e,r)}},{key:"updateParamsByFactor",value:function(e){for(var t,n=this,r=this.playerConfig.mediaInfo||this.playerConfig,i=(this.playerConfig.baseConfig||r).codecType,o=r.videoHeight,a=r.videoWidth,s=0|navigator.deviceMemory,u=0|navigator.hardwareConcurrency,c=null,l={codecType:i,videoHeight:o,videoWidth:a,memory:s,core:u},f=0;f0?null===(u=t.baseConfig)||void 0===u?void 0:u.urlList:(null===(c=t.baseConfig)||void 0===c?void 0:c.url)||t.url,definition:(null==r?void 0:r.defaultDefinition)||t.defaultDefinition||-1,bitrate:(r||t).defaultBitrate||((null===(l=t.baseConfig)||void 0===l?void 0:l.mediaInfo)||t).bitrate||-1,type:SF.DEFAULT}),f&&(f.networkSpeed=this.getSpeed()),f||void 0}}},{key:"getSuitableBitrate",value:function(e,t){if(this.bitRateAdapter)return L_(e,{config:this.config,bitrateAdapter:this.bitRateAdapter,userDefinition:t})}},{key:"getAdaptBitrate",value:function(e,t){var n,r=null,i=this.bitRateAdapter,o=this.config;return o.disabled||!i||(ux(e=lA(n=Ln(e,o.bitrateKey)).call(n,function(e,t){return"number"==typeof e._xgOrgBitrate&&"number"==typeof t._xgOrgBitrate?t._xgOrgBitrate-e._xgOrgBitrate:0}))&&e.length&&(i.speed=t,r=i.select(e,o.mode,t)),r&&(r.type=SF.BITRATE_ADAPTER)),r}},{key:"getDefinition",value:function(e,t,n){for(var r=-1,i=0;ir+1?e[r+1]:!n&&r-1>=0?e[r-1]:null}},{key:"needChangeDefinition",value:function(){var t,n,r,i,o=this.playerConfig,a=this.player,s=[];try{i=a.curDefinition,s=(null===(t=o.shared)||void 0===t||null===(t=t.definition)||void 0===t?void 0:t.list)||a.definitionList}catch(e){}var u=(null===(n=o.shared)||void 0===n||null===(n=n.definition)||void 0===n?void 0:n.userSelectDefinition)||o.userSelectDefinition,c=(null===(r=o.shared)||void 0===r||null===(r=r.definition)||void 0===r?void 0:r.extDefinition)||o.extDefinition,l=ux(c)&&c.length>0?c:s||[],f={type:0,message:"DO_NOT_UPDATE",targetDefinition:null};if(!u||l.length<2)return f;var h=i;u&&(h=e.getUserSelectBitrate(l,u));var d=Lp.checkDefinition();f.type=d;var p=1024*this.getSpeed(),v=this.getAdaptBitrate(l,p);if(!(v&&0!==d&&v&&v._xgOrgBitrate&&h&&h._xgOrgBitrate))return f.message="DO_NOT_UPDATE",f;var g=v._xgOrgBitrate>=h._xgOrgBitrate,y=v._xgOrgBitrate1&&n.core>=Number(s[0])&&n.core<=Number(s[1])&&(u=!0);break;case"memory":n.memory&&s.length>1&&n.memory>=Number(s[0])&&n.memory<=Number(s[1])&&(u=!0);break;case"video_screen_mode":;s.length>0&&"landscape"===s[0]&&(o=n.videoHeight,a=n.videoWidth,o&&a&&a>o)&&(u=!0);break;case"encoder":s.length>0&&s[0]&&n.codecType&&s[0]===n.codecType&&(u=!0)}return u}},{key:"getSpeed",value:function(){return Lm(this.config)}}],[{key:"pluginName",get:function(){return"BitrateSelector"}},{key:"defaultConfig",get:function(){return uM({needCheckDuration:!0},Ly)},set:function(e){var t;uC(t=uI(e)).call(t,function(t){Ly[t]=e[t]})}},{key:"getSuitableBitrate",value:function(t,n,r){return r||(r=e.defaultConfig),r=uM(r,Ly),n||(n=Lg),L_(t,{userDefinition:n,config:r})}},{key:"getUserSelectBitrate",value:function(e,t){if(t&&e&&e.length>0){for(var n=null,r=null,i=0;i=0};return!!(o(t)&&o(r)&&o(i))&&"object"===ot(n)&&n.S>=0&&n.M>=0&&n.L>=0&&n.XL>=0}},{key:"execTask",value:function(){if(this._activePlayer&&this._nextPlayer){if(this.isValidConfig()){var e=this.config.nextBuffer,t=e.nextBufferMin,n=e.scale,r=e.nextStartPos,i=e.nextStartBuffer,o=this._nextPlayer.duration,a=this._activePlayer.currentTime,s=this._activePlayer.getBufferedRange(),u=t;a>r&&s[1]>i?(o<=60?u=t+10*n.S:o>60&&o<=180?u=t+10*n.M:o>180&&o<=600?u=t+10*n.L:o>600&&(u=t+10*n.XL),this._nextPlayer.updateConfig({baseConfig:{maxBufferCtrl:!0,maxBufferLength:u}}),this._activePlayer.updateConfig({baseConfig:{maxBufferCtrl:!1}}),this._clearTimer(),this._activePlayer=void 0,this._nextPlayer=void 0):this._startTimer()}else this._startTimer()}}}],[{key:"pluginName",get:function(){return"BufferControlPlugin"}},{key:"defaultConfig",get:function(){return{nextBuffer:{nextStartPos:0,nextStartBuffer:0,nextBufferMin:5,scale:{S:.2,M:.4,L:.2,XL:.4}}}}}])}(),LE=function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[t],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,lZ),uz(e,[{key:"getRecommendation",value:function(){var e={plugins:[],pluginConfiguration:{},result:{}};return this.config.disabled||(e.plugins=[Lk],e.pluginConfiguration=oX({},Lk.pluginName,oJ({},this.config))),e.result={},e}}])}();oX(LE,"strategyName",l5.bufferControl),oX(LE,"strategyPriority",l3.bufferControl);var LT=new l9("VeStrategy-degrade-plugin"),Lz=[3008,3004],LA=function(){function e(t){var n,r,i,o;return uE(this,e),oX((r=this,i=e,o=[t],i=lV(i),n=lP(r,lG()?lW(i,o||[],lV(r).constructor):i.apply(r,o))),"_onDegrade",function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.category,o=r.errc,a=r.err_msg;switch(LT.warn(ll(e=ll(t="degradation occurred, category: ".concat(i,", ")).call(t,o," - ")).call(e,a)),i){case SG.PRELOAD_NOT_HIT:n.setBaseConfig({coreType:"media"}),n.setSharedConfig({vtype:"MP4_0"});break;case SG.ERROR_ON_FLY:n._degradeOnFly(o)}}),oX(n,"_onError",function(e,t){var r,i,o=n.player.error||e;o?n._satisfyToDegrade(o)?(t instanceof Event&&t.stopImmediatePropagation(),n.player.emit("degrade",{category:SG.ERROR_ON_FLY,errc:o.code,err_msg:o.message})):LT.error(ll(r=ll(i="Degrader allowed finally error occurred, code: ".concat(o.code,", message: ")).call(i,o.message,", ext: ")).call(r,fp.stringify(o.ext||{}))):LT.warn("Degrader get error event, but player.error is empty")}),oX(n,"_degradeOnFly",function(e){var t,r=n.player,i=n.config.sourceList,o=n._getDegradeURL(e),a=o.url,s=o.codecType;if(LT.warn(ll(t="degrade to codec: ".concat(s,", url: ")).call(t,u5(a||[]))),r._changeCore){var u,c,l="DASH"===(null===(u=r.config.shared)||void 0===u||null===(u=u.vtype)||void 0===u?void 0:u.toUpperCase()),f=n._getCoreConfig(a||(null===(c=r.config.baseConfig)||void 0===c?void 0:c.urlList)||[],l?"dash_mp4_2":"MP4_1");r.config.baseConfig&&(null==i?void 0:i.length)>0&&(r.config.baseConfig.url=f.baseConfig.url,r.config.baseConfig.urlList=f.baseConfig.urlList),r._changeCore("media",f)}}),n.player.on("error",n._onError),n.player.on("degrade",n._onDegrade),n}return lK(e,lq),uz(e,[{key:"codecType",get:function(){var e,t,n=this.player,r=this.playerConfig;return(null===(e=n.curDefinition)||void 0===e?void 0:e.codecType)||(null===(t=r.shared)||void 0===t?void 0:t.codecType)||this.config.codecType}},{key:"beforeDestroy",value:function(){this.player.off("error",this._onError),this.player.off("degrade",this._onDegrade)}},{key:"_satisfyToDegrade",value:function(t){var n,r,i,o=uM({},e.defaultConfig,this.config),a=!1;try{a=!!localStorage.getItem("player_no_degrade")}catch(e){}return!(!o.enable||a)&&"media"!==(null===(n=this.playerConfig.baseConfig)||void 0===n?void 0:n.coreType)&&!(ux(o.notDegradeErrorList)&&h6(r=o.notDegradeErrorList).call(r,(null==t||null===(i=t.ext)||void 0===i?void 0:i.httpCode)||"")>=0)}},{key:"_getCoreConfig",value:function(e,t){var n=this.player,r={};return"string"==typeof e&&e.length>0?r.url=e:ux(e)&&e.length>0&&(r.urlList=e,r.url=e[0].src),"MP4_1"!==t&&"dash_mp4_2"!==t||(r.startTime=n.currentTime,n.paused||(r.autoplay=!0)),{baseConfig:r,shared:{vtype:t}}}},{key:"_getDegradeURL",value:function(e){var t,n,r=this.config,i=r.vvcSupported,o=r.hevcSupported,a=r.sourceList,s=[],u=this.playerConfig,c=(u.baseConfig||u||{}).preProcessUrl;switch(null===(t=this.codecType)||void 0===t?void 0:t.toLowerCase()){case"h264":default:n="h264";break;case"h265":n=o?"h265":"h264";break;case"h266":n=i?"h266":o?"h265":"h264"}var l=!1;"h265"===n&&(fl(Lz).call(Lz,e||0)&&(n="h264"),l=!0);var f=/(version)\/([\d.]+)\s*(safari)/i.test(navigator.userAgent);if(ux(a)&&a.length>0){for(var h=0;h>16)&4294967295)<<16)+(t=18e3*(65535&t)+(t>>16)&4294967295)&4294967295;return e/=4294967296,(e+=.5)*(Math.random()>.5?1:-1)}}(4294967296*(t||Math.random()));t=987654071*i(),n.push(4294967296*i()|0)}return new LW(n,e)};var LK=uz(function e(){uE(this,e)},[{key:"mixIn",value:function(e){return uM(this,e)}},{key:"clone",value:function(){var e=new this.constructor;return uM(e,this),e}}],[{key:"create",value:function(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4*n.length;uE(this,e),t=LF(this,e);var i=n;if(i instanceof ArrayBuffer&&(i=new Uint8Array(i)),(i instanceof Int8Array||i instanceof Uint8ClampedArray||i instanceof Int16Array||i instanceof Uint16Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Float32Array||i instanceof Float64Array)&&(i=new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),i instanceof Uint8Array){for(var o=i.byteLength,a=[],s=0;s>>2]|=i[s]<<24-s%4*8;t.words=a,t.sigBytes=o}else t.words=n,t.sigBytes=r;return t}return lK(e,LK),uz(e,[{key:"toString",value:function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:Lq).stringify(this)}},{key:"concat",value:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s>>2]=n[s>>>2];return this.sigBytes+=i,this}},{key:"clamp",value:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=Math.ceil(t/4)}},{key:"clone",value:function(){var t,n=LG(e,"clone",this,1).call(this);return n.words=pv(t=this.words).call(t,0),n}}])}();oX(LW,"random",LV);for(var Lq={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=hl(e.substr(r,2),16)<<24-r%8*4;return new LW(n,t/2)}},LY={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new LW(n,t)}},LZ={parse:function(e){return LY.parse(unescape(encodeURIComponent(e)))}},LX=function(){function e(){var t;return uE(this,e),(t=LF(this,e))._minBufferSize=0,t}return lK(e,LK),uz(e,[{key:"reset",value:function(){this._data=new LW,this._nDataBytes=0}},{key:"_append",value:function(e){var t,n=e;"string"==typeof n&&(n=LZ.parse(n)),ll(t=this._data).call(t,n),this._nDataBytes+=n.sigBytes}},{key:"_process",value:function(e){var t,n=this._data,r=this.blockSize,i=n.words,o=n.sigBytes,a=o/(4*r),s=(a=e?Math.ceil(a):Math.max((0|a)-this._minBufferSize,0))*r,u=Math.min(4*s,o);if(s){for(var c=0;cs&&(o=i.finalize(n)),o.clamp();var u=o.clone();r._oKey=u;var c=o.clone();r._iKey=c;for(var l=u.words,f=c.words,h=0;h>>32-o)+t},L2=function(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<>>32-o)+t},L5=function(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<>>32-o)+t},L4=function(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<>>32-o)+t},L3=function(){function e(){var t,n,r;return uE(this,e),t=this,n=e,r=arguments,n=lV(n),lP(t,lG()?lW(n,r||[],lV(t).constructor):n.apply(t,r))}return lK(e,LQ),uz(e,[{key:"_doReset",value:function(){this._hash=new LW([1732584193,4023233417,2562383102,271733878])}},{key:"_doProcessBlock",value:function(e,t){for(var n=0;n<16;n+=1){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],s=e[t+1],u=e[t+2],c=e[t+3],l=e[t+4],f=e[t+5],h=e[t+6],d=e[t+7],p=e[t+8],v=e[t+9],g=e[t+10],y=e[t+11],m=e[t+12],_=e[t+13],b=e[t+14],w=e[t+15],S=o[0],k=o[1],E=o[2],T=o[3];S=L1(S,k,E,T,a,7,L$[0]),T=L1(T,S,k,E,s,12,L$[1]),E=L1(E,T,S,k,u,17,L$[2]),k=L1(k,E,T,S,c,22,L$[3]),S=L1(S,k,E,T,l,7,L$[4]),T=L1(T,S,k,E,f,12,L$[5]),E=L1(E,T,S,k,h,17,L$[6]),k=L1(k,E,T,S,d,22,L$[7]),S=L1(S,k,E,T,p,7,L$[8]),T=L1(T,S,k,E,v,12,L$[9]),E=L1(E,T,S,k,g,17,L$[10]),k=L1(k,E,T,S,y,22,L$[11]),S=L1(S,k,E,T,m,7,L$[12]),T=L1(T,S,k,E,_,12,L$[13]),E=L1(E,T,S,k,b,17,L$[14]),k=L1(k,E,T,S,w,22,L$[15]),S=L2(S,k,E,T,s,5,L$[16]),T=L2(T,S,k,E,h,9,L$[17]),E=L2(E,T,S,k,y,14,L$[18]),k=L2(k,E,T,S,a,20,L$[19]),S=L2(S,k,E,T,f,5,L$[20]),T=L2(T,S,k,E,g,9,L$[21]),E=L2(E,T,S,k,w,14,L$[22]),k=L2(k,E,T,S,l,20,L$[23]),S=L2(S,k,E,T,v,5,L$[24]),T=L2(T,S,k,E,b,9,L$[25]),E=L2(E,T,S,k,c,14,L$[26]),k=L2(k,E,T,S,p,20,L$[27]),S=L2(S,k,E,T,_,5,L$[28]),T=L2(T,S,k,E,u,9,L$[29]),E=L2(E,T,S,k,d,14,L$[30]),k=L2(k,E,T,S,m,20,L$[31]),S=L5(S,k,E,T,f,4,L$[32]),T=L5(T,S,k,E,p,11,L$[33]),E=L5(E,T,S,k,y,16,L$[34]),k=L5(k,E,T,S,b,23,L$[35]),S=L5(S,k,E,T,s,4,L$[36]),T=L5(T,S,k,E,l,11,L$[37]),E=L5(E,T,S,k,d,16,L$[38]),k=L5(k,E,T,S,g,23,L$[39]),S=L5(S,k,E,T,_,4,L$[40]),T=L5(T,S,k,E,a,11,L$[41]),E=L5(E,T,S,k,c,16,L$[42]),k=L5(k,E,T,S,h,23,L$[43]),S=L5(S,k,E,T,v,4,L$[44]),T=L5(T,S,k,E,m,11,L$[45]),E=L5(E,T,S,k,w,16,L$[46]),k=L5(k,E,T,S,u,23,L$[47]),S=L4(S,k,E,T,a,6,L$[48]),T=L4(T,S,k,E,d,10,L$[49]),E=L4(E,T,S,k,b,15,L$[50]),k=L4(k,E,T,S,f,21,L$[51]),S=L4(S,k,E,T,m,6,L$[52]),T=L4(T,S,k,E,c,10,L$[53]),E=L4(E,T,S,k,g,15,L$[54]),k=L4(k,E,T,S,s,21,L$[55]),S=L4(S,k,E,T,p,6,L$[56]),T=L4(T,S,k,E,w,10,L$[57]),E=L4(E,T,S,k,h,15,L$[58]),k=L4(k,E,T,S,_,21,L$[59]),S=L4(S,k,E,T,l,6,L$[60]),T=L4(T,S,k,E,y,10,L$[61]),E=L4(E,T,S,k,u,15,L$[62]),k=L4(k,E,T,S,v,21,L$[63]),o[0]=o[0]+S|0,o[1]=o[1]+k|0,o[2]=o[2]+E|0,o[3]=o[3]+T|0}},{key:"_doFinalize",value:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32;var i=Math.floor(n/4294967296);t[15+(r+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,a=o.words,s=0;s<4;s+=1){var u=a[s];a[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return o}},{key:"clone",value:function(){var t,n,r,i,o,a=(t=e,n="clone",r=this,i=1,o=Lj(lV((0,t.prototype)),n,r),2&i&&"function"==typeof o?function(e){return o.apply(r,e)}:o).call(this);return a._hash=this._hash.clone(),a}}])}(),L6=LQ._createHelper(L3);LQ._createHmacHelper(L3);var L8=((r=L8||{}).VESTRATEGY_H265_DETECT_PLAYBACK="VESTRATEGY_H265_DETECT_PLAYBACK",r.VESTRATEGY_H265_IS_SUPPORT="VESTRATEGY_H265_IS_SUPPORT",r.VESTRATEGY_H265_CAN_PLAY_SMOOTHLY="VESTRATEGY_H265_CAN_PLAY_SMOOTHLY",r);function L9(e){return L6([e.url,e.minDroppedFramesRate,e.minTotalVideoFrames,navigator.userAgent.toLowerCase()].join("_")).toString()}var L7=new(uz(function e(){uE(this,e),oX(this,"_detectStatus","init"),oX(this,"_detectResult",void 0)},[{key:"detect",value:function(e){var t;return hF()&&((t=this.getDetectResult(e,{validateCache:!0}))||"init"!==this._detectStatus||this._detectPlaybackRobustness(e)),t}},{key:"getDetectResult",value:function(e,t){if(this._detectResult)return this._detectResult;try{var n,r=fd(L8.VESTRATEGY_H265_DETECT_PLAYBACK);if(!r)return;var i=JSON.parse(r);if(null!=t&&t.validateCache&&(e&&L9(e)!==i.cacheKey||!1===(null==i||null===(n=i.data)||void 0===n?void 0:n.robustErr)))return;return i.data}catch(e){return}}},{key:"_detectPlaybackRobustness",value:(i=uk(uw().mark(function e(t){var n,r;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("pending"!==this._detectStatus){e.next=1;break}return e.abrupt("return");case 1:return this._detectStatus="pending",n=L9(t),e.prev=2,e.next=3,function(e){return hG.apply(this,arguments)}(t);case 3:r=e.sent,fh(L8.VESTRATEGY_H265_DETECT_PLAYBACK,u5({data:r,cacheKey:n})),e.next=5;break;case 4:e.prev=4,e.catch(2);case 5:return this._detectStatus="end",this._detectResult=r,e.abrupt("return",r);case 6:case"end":return e.stop()}},e,this,[[2,4]])})),function(e){return i.apply(this,arguments)})}])),Me=new l9("VeStrategy-H265"),Mt=function(){var e,t;function n(){var e,t,r;return uE(this,n),e=this,t=n,r=arguments,t=lV(t),lP(e,lG()?lW(t,r||[],lV(e).constructor):t.apply(e,r))}return lK(n,lZ),uz(n,[{key:"getRecommendation",value:function(){this.config.detectConfig&&L7.detect(this.config.detectConfig);var e=L7.getDetectResult(),t=this.config.whiteListConfig;this.ctx.featureCenter.getDeviceMarkInfoAsync();var n=this.ctx.featureCenter.getFeatureList(),r=this.getResult({detectResult:e,whiteListConfig:t,deviceInfo:n});return{result:{enable:(null==r?void 0:r.isSupported)&&(null==r?void 0:r.canPlaySmoothly),decoderPrefer:"",enableH265Hardware:(null==r?void 0:r.isSupported)&&(null==r?void 0:r.canPlaySmoothly)}}}},{key:"getResult",value:function(e){var t,n=e.detectResult,r=e.whiteListConfig,i=e.deviceInfo,o=hF();t=null==r||r.enable&&void 0===i?{useH265:!1}:r.enable?dz(r.whiteList,{CPUScore:i.cpuScore,CPUCore:i.cpuCore,GPUScore:i.gpuScore}):{useH265:!0};try{Me.info("H265Result",u5({isHevcApiSupported:o,detectResult:n,whiteListConfig:r,kvResult:t}))}catch(e){}return{isSupported:!!(o&&n&&!0!==(null==n?void 0:n.robustErr)),canPlaySmoothly:!!((null==t?void 0:t.useH265)&&(null==n?void 0:n.status))}}}],[{key:"prepareBeforeStarted",value:(t=uk(uw().mark(function e(t){var n;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.ctx.featureCenter.getDeviceMarkInfoAsync(),Me.update(null===(n=t.ctx.dataCenter.getAppConfig())||void 0===n?void 0:n.log),Me.info("PrepareBeforeStarted");case 1:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})},{key:"prepareAfterStarted",value:(e=uk(uw().mark(function e(t){return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.config.detectConfig&&L7.detect(t.config.detectConfig),Me.info("PrepareAfterStarted");case 1:case"end":return e.stop()}},e)})),function(t){return e.apply(this,arguments)})}])}();oX(Mt,"strategyName",l5.h265),oX(Mt,"strategyPriority",l3.h265);var Mn=function(){function e(){uE(this,e)}return uz(e,[{key:"load",value:function(t,n){var r=oJ({},e.getDefaultConfig()),i=r.timeout,o=r.withCredentials,a=r.responseType,s=r.method,u=new XMLHttpRequest;return u.open(s,t,!0),u.timeout=i,u.withCredentials=o,u.responseType=a,u.send(null==n?void 0:n.body),new uA(function(e,t){u.onload=function(){200===u.status?e(u.response):t(Error("Request failed with status ".concat(u.status)))},u.onerror=function(){var e;t(Error(ll(e="Network error, code ".concat(u.status,", message: ")).call(e,u.statusText)))},u.ontimeout=function(){t(Error("Network error:timeout"))}})}}],[{key:"getDefaultConfig",value:function(){return{method:"POST",timeout:5e3,withCredentials:!1,responseType:"json"}}}])}(),Mr=["bitrate"],Mi=["bitrate"],Mo=((o=Mo||{}).VIDEO="video",o.AUDIO="audio",o),Ma=function(){var e,t;function n(e,t){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"video";uE(this,n),oX(this,"loader",null),oX(this,"trackerReqArgs",{req_times:0,resp_times:0,fid:"",node_num:5}),oX(this,"lastFileInfo",null),oX(this,"lastfetchNodeTime",0),oX(this,"lastRetFileKey",null),oX(this,"minUpdateNodeStep",0),oX(this,"options",void 0),oX(this,"PCDN_NODE_MAP",new d7),oX(this,"mediaType",void 0),oX(this,"player",void 0),oX(this,"deletePCDNNode",function(e){null!=e&&e.length&&uC(e).call(e,function(e){r.removePCDNNode(e.vid,e.bitrate,e.url)})}),oX(this,"startGetPCDNNode",function(e,t){r.getPCDNNode(r.options.trackerUrl,e).then(function(n){var i;if(n&&"object"===ot(n)&&(null===(i=n.nodes)||void 0===i?void 0:i.length)>0){var o,a=lD(o=n.nodes).call(o,function(t){return{src:t.url,fid:e.sfid,vid:n.vid,bitrate:n.bitrate}}),s={baseConfig:oJ({},t.baseConfig)};"video"===r.mediaType?s.baseConfig.pcdnUrlList=a:"audio"===r.mediaType&&(s.baseConfig.pcdnAudioUrlList=a),r.player.updateConfig(s,!0)}}).catch(function(e){})}),this.player=e,this.options=t,this.mediaType=i,this.loader=new Mn,this.resetTrackeReqArgs(),this.minUpdateNodeStep=this.options.ErrorTimeStep||15e3}return uz(n,[{key:"resetTrackeReqArgs",value:function(){this.trackerReqArgs={fid:"",trace_id:"",req_times:0,resp_times:0,token:"",node_num:this.options.node_num||5,client_info:this.options.client_info}}},{key:"getPCDNNode",value:function(e,t){var n,r,i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=o?[]:this.PCDN_NODE_MAP.get(Ms((null==t?void 0:t.vid)||(null===(n=this.lastFileInfo)||void 0===n?void 0:n.vid)||"",Mu((null==t?void 0:t.bitrate)||(null===(r=this.lastFileInfo)||void 0===r?void 0:r.bitrate)||0))),s=uA.withResolvers(),u=s.promise,c=s.resolve,l=s.reject;return o||null==a||!a.nodes||(null==a||null===(i=a.nodes)||void 0===i?void 0:i.length)<1?this.fetchPCDNNode(e,t).then(function(e){c(e)}).catch(function(e){l(e)}):(a.fromCache=!0,c(a)),u}},{key:"getReqId",value:function(e,t){var n;return(null==e?void 0:e.length)>0?pv(e).call(e,-20)+t:pv(n="getPeerReq"+l$()).call(n,-20)}},{key:"removePCDNNode",value:function(e,t,n){var r=Mu(t),i=this.PCDN_NODE_MAP.get(Ms(e,r)),o=null==i?void 0:i.nodes;o&&(n?i.nodes=lC(o).call(o,function(e){return e&&0>h6(n).call(n,e.url)}):o.shift(),this.PCDN_NODE_MAP.set(Ms(e,r),i)),o&&o.length||this.fetchPCDNNode(null,null).catch(function(){})}},{key:"fetchPCDNNode",value:(t=uk(uw().mark(function e(t,r){var i,o,a,s,u,c,l,f,h,d,p,v,g,y,m,_,b,w,S,k,E,T;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(u=r||this.lastFileInfo||{}).bitrate,null!==(i=(l=oJ({},wX(u,Mr))).vid)&&void 0!==i&&i.length){e.next=1;break}return e.abrupt("return",null);case 1:if(l.byterate=Mu((null==r?void 0:r.bitrate)||0),this.lastFileInfo=r,f=Ms(l.vid,l.byterate),h=!1,this.lastRetFileKey!==f&&(this.resetTrackeReqArgs(),h=!0),!(l$()-this.lastfetchNodeTime=this.options.maxCnt)){e.next=3;break}return e.abrupt("return",null);case 3:return this.loader||(this.loader=new Mn),this.trackerReqArgs.req_times+=1,e.prev=4,n.pcdn_tracker_request_cnt++,e.next=5,this.loader.load(t||this.options.trackerUrl,{body:p});case 5:if(v=e.sent,g=null,!v){e.next=8;break}if(this.trackerReqArgs.resp_times+=1,null==v||!v.Result){e.next=7;break}if(b=(_=v.Result).fid,w=_.trace_id,S=_.req_id,k=this.getReqId((null===(y=this.lastFileInfo)||void 0===y?void 0:y.vid)||"",(null===(m=this.lastFileInfo)||void 0===m?void 0:m.bitrate)||0),S===k){e.next=6;break}return e.abrupt("return",null);case 6:return(g=_.nodes)&&g.length>0?n.pcdn_tracker_success_cnt++:this.minUpdateNodeStep=this.options.NULLNodeTimeStep,lD(g).call(g,function(e){e.vid=l.vid,e.bitrate=c}),E={nodes:g,fid:b,vid:l.vid,trace_id:w,req_id:S,bitrate:c},this.PCDN_NODE_MAP.set(f,E),this.trackerReqArgs.fid=_.fid,this.trackerReqArgs.trace_id=_.trace_id,this.trackerReqArgs.token=_.token,e.abrupt("return",E);case 7:return this.minUpdateNodeStep=this.options.ErrorTimeStep,e.abrupt("return",null);case 8:e.next=10;break;case 9:return e.prev=9,e.catch(4),this.minUpdateNodeStep=this.options.ErrorTimeStep,e.abrupt("return",null);case 10:return e.abrupt("return",null);case 11:case"end":return e.stop()}},e,this,[[4,9]])})),function(e,n){return t.apply(this,arguments)})}],[{key:"gainPCDNNode",value:(e=uk(uw().mark(function e(t,r,i,o){var a,s,u,c,l,f,h,d,p,v,g,y,m;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=uM({},r),u=(s=uA.withResolvers()).promise,c=s.resolve,l=s.reject,a.productConfig&&a.productConfig.app_id||l("productConfig must has app_id"),i||l("video fileInfo need set"),f=i.bitrate,h=oJ({},wX(i,Mi)),i.bitrate&&(h.byterate=Mu(f)),i.sfid?h.version=1:i.vid&&(h.version=2),r.withReferer&&(h.with_referer=r.withReferer),d=u5(uM({},o,{file_info:h},{node_num:(null==r?void 0:r.node_num)||3})),p=new Mn,e.prev=1,n.pcdn_tracker_request_cnt++,e.next=2,p.load(t,{body:d});case 2:(null==(y=e.sent)||null===(v=y.Result)||void 0===v||null===(v=v.nodes)||void 0===v?void 0:v.length)>0&&n.pcdn_tracker_success_cnt++,c((null===(g=y.Result)||void 0===g?void 0:g.nodes)||[]),e.next=4;break;case 3:e.prev=3,m=e.catch(1),l((null==m?void 0:m.message)||"get pcdnNode error");case 4:return e.abrupt("return",u);case 5:case"end":return e.stop()}},e,null,[[1,3]])})),function(t,n,r,i){return e.apply(this,arguments)})}])}();function Ms(e,t){var n;return ll(n="".concat(e,"-")).call(n,t)}function Mu(e){return Math.floor(e/8)}oX(Ma,"pcdn_tracker_request_cnt",0),oX(Ma,"pcdn_tracker_success_cnt",0);var Mc=function(){function e(t){var n,r,i,o;return uE(this,e),oX((r=this,i=e,o=[t],i=lV(i),n=lP(r,lG()?lW(i,o||[],lV(r).constructor):i.apply(r,o))),"options",void 0),oX(n,"_mediaTypeToService",{audio:null,video:null}),oX(n,"_isDASH",!1),oX(n,"_lastMediaInfo",null),oX(n,"deletePCDNNode",function(e){var t,r,i=e.deleteUrl;"audio"===e.mediaType?null===(t=n._mediaTypeToService.audio)||void 0===t||t.deletePCDNNode(i):null===(r=n._mediaTypeToService.video)||void 0===r||r.deletePCDNNode(i)}),oX(n,"startGetPCDNNode",function(){var e,t=(null===(e=n.playerConfig.baseConfig.pcdnUrlList)||void 0===e?void 0:e.length)<1;if(n._isDASH){if("DASH"!==n.playerConfig.shared.vtype)return;var r=(null===(u=n.player.config.shared)||void 0===u||null===(u=u.definition)||void 0===u?void 0:u.list)||[],i=n.playerConfig.baseConfig.mediaInfo;n._lastMediaInfo=i;var o=i.file_id,a=lC(r).call(r,function(e){return o===e.file_id})[0],s=null;if(a){var u,c,l=n._genFileInfo(a,a.main_url);t&&(null===(c=n._mediaTypeToService.video)||void 0===c||c.startGetPCDNNode(l,n.playerConfig));var f=lC(r).call(r,function(e){return"audio"===e.mediaType});(s=lC(f).call(f,function(e){return a.audio_file_id===e.file_id})[0])&&(s=f[0])}if(s){var h,d,p=n._genFileInfo(oJ(oJ({},s),{},{uri:a.uri||Sj(n.player),duration:a.duration||n.player.duration}),s.main_url);(null===(h=n.playerConfig.baseConfig.pcdnAudioUrlList)||void 0===h?void 0:h.length)<1&&(null===(d=n._mediaTypeToService.audio)||void 0===d||d.startGetPCDNNode(p,n.playerConfig))}}else{if("MP4"!==n.playerConfig.shared.vtype)return;if(t){var v,g=n.playerConfig.baseConfig.mediaInfo,y=n._genFileInfo(g,n.playerConfig.baseConfig.urlList[0].src);null===(v=n._mediaTypeToService.video)||void 0===v||v.startGetPCDNNode(y,n.playerConfig)}}}),n.options=uM({},e.getDefaultConfig(),n.config),n}return lK(e,lq),uz(e,[{key:"afterPlayerInit",value:function(){var e;this.options.productConfig&&this.options.productConfig.app_id&&(this._mediaTypeToService.video=new Ma(this.player,this.options),"dash"===(null===(e=this.playerConfig.baseConfig.protocol)||void 0===e?void 0:e.toLowerCase())&&(this._isDASH=!0,this._mediaTypeToService.audio=new Ma(this.player,this.options,Mo.AUDIO)),this.player.on("loadeddata",this.startGetPCDNNode),this.player.on("delete_pcdn_url",this.deletePCDNNode))}},{key:"beforeDestroy",value:function(){this.player.off("loadeddata",this.startGetPCDNNode),this.player.off("delete_pcdn_url",this.deletePCDNNode)}},{key:"configDidUpdate",value:function(){var e=!1,t=this.playerConfig.baseConfig.mediaInfo;this._lastMediaInfo&&t.file_id!==this._lastMediaInfo.file_id&&(e=!0),e&&(this.playerConfig.baseConfig.pcdnUrlList=[],this.playerConfig.baseConfig.pcdnAudioUrlList=[]),this.startGetPCDNNode()}},{key:"_genFileInfo",value:function(e,t){return{bitrate:e.bitrate,cdn_url:t,duration:e.duration,size:e.size,vid:e.uri,file_type:this.playerConfig.baseConfig.protocol,sfid:e.file_id}}}],[{key:"pluginName",get:function(){return"PCDN"}},{key:"pcdnReqCnt",get:function(){var e=Ma.pcdn_tracker_request_cnt,t=Ma.pcdn_tracker_success_cnt;return Ma.pcdn_tracker_request_cnt=0,Ma.pcdn_tracker_success_cnt=0,{pcdn_tracker_request_cnt:e,pcdn_tracker_failed_cnt:e-t}}},{key:"getDefaultConfig",value:function(){return{trackerUrl:"",node_num:5,maxCnt:30,withReferer:0,NULLNodeTimeStep:6e4,ErrorTimeStep:15e3,productConfig:{app_id:0}}}}])}(),Ml=function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[t],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,lZ),uz(e,[{key:"getRecommendation",value:function(){var e={plugins:[],pluginConfiguration:{},result:{enable:!1}};return this.config.disabled||(e.plugins=[Mc],e.pluginConfiguration=oX({},Mc.pluginName,this.config)),e.result=oJ(oJ({},this.config),{},{enable:!0}),e}}])}();oX(Ml,"strategyName",l5.pcdn),oX(Ml,"strategyPriority",l3.pcdn);var Mf=nG.findIndex,Mh="findIndex",Md=!0;Mh in[]&&[,][Mh](function(){Md=!1}),ta({target:"Array",proto:!0,forced:Md},{findIndex:function(e){return Mf(this,e,arguments.length>1?arguments[1]:void 0)}});var Mp=i5("Array","findIndex"),Mv=Array.prototype,Mg=d(function(e){var t=e.findIndex;return e===Mv||ee(Mv,e)&&t===Mv.findIndex?Mp:t}),My=((a=My||{})[a.INDEXDB=0]="INDEXDB",a[a.MEMORY=1]="MEMORY",a),Mm=((s=Mm||{}).PRELOAD_NEXT="PRELOAD_NEXT",s.PRELOAD_START="PRELOAD_START",s.PRELOAD_CANCEL="PRELOAD_CANCEL",s);function M_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Mz(e,t,n){return(t=MO(t))in e?f_(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MA(e){return(MA=SV?yT(SH).call(SH):function(e){return e.__proto__||SH(e)})(e)}function MC(){try{var e=!Boolean.prototype.valueOf.call(lW(Boolean,[],function(){}))}catch(e){}return(MC=function(){return!!e})()}function MI(e,t){var n=uI(e);if(ph){var r=ph(e);t&&(r=lC(r).call(r,function(t){return SW(e,t).enumerable})),n.push.apply(n,r)}return n}function Mx(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function MP(e,t){return(MP=SV?yT(SV).call(SV):function(e,t){return e.__proto__=t,e})(e,t)}function MO(e){var t=function(e,t){if("object"!=ot(e)||!e)return e;var n=e[SZ];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ot(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ot(t)?t:t+""}function ML(e){return(ML="function"==typeof pd&&"symbol"==typeof pk?function(e){return typeof e}:function(e){return e&&"function"==typeof pd&&e.constructor===pd&&e!==pd.prototype?"symbol":typeof e})(e)}function MM(e,t){if(e){if("string"==typeof e)return M_(e,t);var n,r=pv(n=({}).toString.call(e)).call(n,8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?pe(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?M_(e,t):void 0}}var MB=IC&&IC.prototype;if(TE({target:"Promise",proto:!0,real:!0,forced:!!IC&&S7(function(){MB.finally.call({then:function(){}},function(){})})},{finally:function(e){var t=CE(this,kP("Promise")),n=kx(e);return this.then(n?function(n){return xl(t,e()).then(function(){return n})}:e,n?function(n){return xl(t,e()).then(function(){throw n})}:e)}}),kx(IC)){var MN=kP("Promise").prototype.finally;MB.finally!==MN&&E4(MB,"finally",MN,{unsafe:!0})}var MU={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}SK&&(r.prototype=SK(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?pv(r).call(r,1):r);return ph?ll(i).call(i,ph(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=Array(o);i1?arguments[1]:void 0)}});var MG=TypeError,MV=Object.getOwnPropertyDescriptor,MH=ke&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(TT(e)&&!MV(e,"length").writable)throw MG("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},MK=TQ("splice"),MW=Math.max,Mq=Math.min;function MY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=ot(e)||!e)return e;var n=e[SZ];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=ot(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ot(t)?t:t+""}(t))in e?f_(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}TE({target:"Array",proto:!0,forced:!MK},{splice:function(e,t){var n,r,i,o,a,s,u=k4(this),c=To(u),l=Tn(e,c),f=arguments.length;for(0===f?n=r=0:1===f?(n=0,r=c-l):(n=f-2,r=Mq(MW(E7(t),0),c-l)),TA(c+n-r),i=TZ(u,r),o=0;oc-r+n;o--)DZ(u,o-1)}else if(n>r)for(o=c-r;o>l;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:DZ(u,s);for(o=0;o1?arguments[1]:void 0)}}),zf("includes");var Bt=kg(ki.f),Bn=kg([].push),Br=function(e){return function(t){for(var n,r=kz(t),i=T5(r),o=i.length,a=0,s=[];o>a;)n=i[a++],ke&&!Bt(r,n)||Bn(s,e?[n,r[n]]:r[n]);return s}},Bi={entries:Br(!0),values:Br(!1)}.values;TE({target:"Object",stat:!0},{values:function(e){return Bi(e)}});var Bo=TypeError,Ba=Eo("match"),Bs=function(e){if(xj(e))throw Bo("The method doesn't accept regular expressions");return e},Bu=kg("".indexOf);TE({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Ba]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~Bu(Aj(kT(this)),Aj(Bs(e)),arguments.length>1?arguments[1]:void 0)}});var Bc=function(){try{if("undefined"!=typeof indexedDB)return indexedDB}catch(e){}}();function Bl(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function Bf(e){return"string"!=typeof e&&(e=String(e)),e}var Bh={},Bd="readonly",Bp="readwrite";function Bv(e){var t=Bh[e.name],n={};n.promise=new uA(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function Bg(e,t){return new uA(function(n,r){if(Bh[e.name]=Bh[e.name]||Bw(),e.db){if(!t)return n(e.db);Bv(e),e.db.close()}var i=[e.name];t&&i.push(e.version);var o=null==Bc?void 0:Bc.open.apply(Bc,i);t&&(o.onupgradeneeded=function(t){var n=o.result;try{n.createObjectStore(e.storeName)}catch(e){if("ConstraintError"!==e.name)throw e}}),o.onerror=function(e){e.preventDefault(),r(o.error)},o.onsuccess=function(){n(o.result),function(e){var t=Bh[e.name].deferredOperations.pop();if(t)t.resolve(),t.promise}(e)}})}function By(e){return Bg(e,!1)}function Bm(e){return Bg(e,!0)}function B_(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.versione.db.version;if(r&&(e.version,e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function Bb(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return uA.resolve().then(function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),Bg(e,!0)}).then(function(){return(function(e){Bv(e);for(var t=Bh[e.name],n=t.forages,r=0;r0){var i=pv(t).call(t,0,n);r=pv(t).call(t,n);for(var o=0;o0&&(this._maxCache=e)}},{key:"getMemoryInfo",value:function(){return{memory:this._memory,cnt:this._cnt}}}]),BA=["vid","loadType","size","speed","cacheKey","vtype","duration","bitrate"],BC=0,BI=ME(function e(t){var n=this;MS(this,e),this._preload_bandwith_map=new d7,this._usepreload_info=new d7,this._pcdn_info_map=new d7,this._updateRealTimeSpeed=function(e){BC=e.speed,n.emit("real_time_speed",e)},this._manager=t},[{key:"setPreloadBandwidth",value:function(e,t){this._preload_bandwith_map.set(e,t)}},{key:"getPreloadBandwidth",value:function(e){return this._preload_bandwith_map.get(e)}},{key:"_updateLoadInfo",value:function(e,t,n){var r=this._pcdn_info_map.get(e);r||(r={}),r[t]||(r[t]={},r[t].loadLen=0),r[t].loadLen=r[t].loadLen+n,this._pcdn_info_map.set(e,r)}},{key:"getLoadInfoAndDelete",value:function(e){var t=this._pcdn_info_map.get(e);return this._pcdn_info_map.delete(e),t}},{key:"getPreloadUnuseInfo",value:function(){var e,t={},n=MT(this._preload_bandwith_map);try{for(n.s();!(e=n.n()).done;){var r,i,o=(r=e.value,i=2,function(e){if(ux(e))return e}(r)||function(e,t){var n=null==e?null:void 0!==pd&&pp(e)||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(r,2)||MM(r,i)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=o[0],s=o[1];if(this._usepreload_info.get(a))this._preload_bandwith_map.delete(a);else{var u=a.split("#"),c=u.length>0?u[0]:a;t[c]?(t[c].bw+=s.bw||0,t[c].pbw+=s.pbw||0):t[c]={vid:c,bw:s.bw||0,pbw:s.pbw||0,bitrate:s.bitrate||0,duration:s.duration||0}}}}catch(e){n.e(e)}finally{n.f()}return M7(t)}},{key:"bwEventEmit",value:function(e){var t=e.vid,n=e.loadType,r=e.size,i=e.speed,o=e.cacheKey,a=e.vtype,s=e.duration,u=e.bitrate,c=MR(e,BA),l=this.getPreloadBandwidth(o)||{bw:0,pbw:0,vid:t,duration:s,bitrate:u};n&&n!==MX.CDN?(l.pbw=l.pbw+r,this.emit("prf_data_size",Mx({vid:t,task_type:2,pcdn_size:r,pcdn_speed:i,vtype:a,bitrate:u,duration:s},c))):(l.bw=l.bw+r,this.emit("prf_data_size",Mx({vid:t,task_type:2,cdn_size:r,cdn_speed:i,vtype:a,duration:s,bitrate:u},c))),this.setPreloadBandwidth(o,l),this._updateRealTimeSpeed({speed:i,type:n||MX.CDN}),this._updateLoadInfo(o,n,r)}},{key:"setUsePreloadInfo",value:function(e,t){this._usepreload_info.set(e,t)}},{key:"realTimeSpeed",get:function(){return BC}},{key:"emit",value:function(e,t){var n;null===(n=this._manager)||void 0===n||n.emit(e,t)}},{key:"destroy",value:function(){this._preload_bandwith_map=new d7,this._usepreload_info=new d7,this._pcdn_info_map=new d7,this._manager=null}}]);function Bx(e,t){var n=[0,0];if(e)for(var r=0,i=e.length;r-1&&dn(o).call(o,p,1),t.next=37;break;case 34:t.prev=34,t.t0=t.catch(26),e.log("error","preload data error!",t.t0);case 37:return t.prev=37,null===(v=e._currentPreloadInst)||void 0===v||v.setData(null),e._currentPreloadInst=null,e._config.autoPreload&&e.emit(Mm.PRELOAD_NEXT),t.finish(37);case 42:return t.abrupt("return",!0);case 43:case"end":return t.stop()}},t,null,[[26,34,37,42]])})),e._stats=new BI(e),e}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=SK(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),f_(e,"prototype",{writable:!1}),t&&MP(e,t)}(a,Mj),ME(a,[{key:"VTYPES",get:function(){return MZ}},{key:"player",get:function(){return this._player}},{key:"stepwise",get:function(){return this._stepwise}},{key:"realTimeSpeed",get:function(){return this._stats.realTimeSpeed}},{key:"currentPreloadInst",get:function(){return this._currentPreloadInst}},{key:"cacheInst",get:function(){return this._cacheInst}},{key:"preloadDataList",get:function(){return this._preloadDataList}},{key:"log",value:function(e){for(var t,n,r=arguments.length,i=Array(r>1?r-1:0),o=1;o0){var e=this.findPreloadItem(this._preloadDataList),t=null==e?void 0:e.data;if(this._wipPreloadTask=e,e&&null!=t&&t.payload){if(!this._getPreloaderKey(t))return this.log("warn","need to set vtype"),this.stopCheckTask(),!1;var n=this._config.checkIfCanPreload;return n&&"function"==typeof n?n(t):this._config.autoCheckPreload?this._autoCheckPreload(t,e):(this.stopCheckTask(),!1)}}return!1}},{key:"_autoCheckPreload",value:function(e,t){return this._player?function(e,t,n){if(!e)return!1;var r=Bx(e.buffered,e.currentTime),i=t.startPreloadControl,o=t.startPreloadMinBuffer,a=t.startPreloadMinPosTime,s=t.minBufferLength;if(i){var u=Math.max(r[1]-e.currentTime,0);if("number"==typeof o&&u>o){if("number"==typeof a&&e.currentTime>a||e.currentTime>e.duration/2)return null==n||n("log","[checkIfStartPreload] hit buffer",u,"startPreloadMinBuffer",o),!0}else if(e.currentTime+o+1>e.duration&&e.currentTime+u>e.duration-1)return null==n||n("log","[checkIfStartPreload] hit end"),!0}else{var c="number"==typeof s&&e.duration>s+5?s:e.duration/2,l=Math.min(e.currentTime+s,e.duration),f=r[1]-l;if(e.currentTime>c&&f>-1)return null==n||n("log","[checkIfStartPreload] hit minPos",c,"minCacheTime",l),!0}return!1}(this._player,this._config,this.log):(this.log("warn","need set video"),!1)}},{key:"_getPreloaderKey",value:function(e){return e.vtype?e.vtype.toUpperCase():""}},{key:"_sort",value:function(e){lA(e).call(e,function(e,t){return void 0===e.order&&void 0===t.order||"number"==typeof e.order&&"number"==typeof t.order&&e.order-1?n[r].vid=t:n.push({vid:t,playerId:e})}},{key:"selectBeforeStart",value:function(e){var t=e.targetDefinition,n=e.defaultDefinition;if(t)return Mx({},t);var r=this.getUserSelectDefinition(),i=this.selectBitrate(null==e?void 0:e.payload,n,r),o=(null==i?void 0:i.vtype)||e.vtype,a=Mx(Mx({},i),{},{vtype:o});return e.targetDefinition=a,this.log("log","selectBeforeStart",null==e?void 0:e.vid,o,null==i?void 0:i.definition,null==e?void 0:e.payload,i),a}},{key:"selectBitrate",value:function(e,t,n){if(e.length<1)return null;var r,i,o,a=null;if(this._selector)a=this._selector.getSuitableBitrate(e,n),this.log("log","BitRateAdapter result",null===(r=a)||void 0===r?void 0:r.vtype,null===(i=a)||void 0===i?void 0:i.definition,null===(o=a)||void 0===o?void 0:o.bitrate);else{for(var s=-1,u=-1,c=0;c=0?s:u>=0?u:0]}return Mx({},a)}},{key:"startCheckTask",value:function(){var e=this,t=this._preloadDataList,n=this._currentPreloadInst,r=this._config.autoCheck;(this._taskIntervalId&&(clearTimeout(this._taskIntervalId),this._taskIntervalId=0),null!=n&&n.taskInProgress&&function(e,t,n){var r=t.endPreloadControl,i=t.endPreloadMinBuffer,o=t.startPreloadMinBuffer;if(!e)return!1;if(r){if("number"==typeof o&&e.currentTime+o>=e.duration)return!1;var a,s=Math.max(Bx(e.buffered,e.currentTime)[1]-e.currentTime,0);if(s<=i)return null==n||n("log","[checkIfCancelPreload] hit buffer:",s,"endPreloadMinBuffer:",i,"video:",ll(a="".concat(e.currentTime,"/")).call(a,e.duration)),!0}return!1}(this._player,this._config,this.log))?this.cancelPreloadingTask():0!==t.length&&(this._checkIfCanPreload()&&this.onPreloadNext(),this._taskIntervalId=pS(function(){e.startCheckTask()},r.interval))}},{key:"cancelPreloadingTask",value:function(){var e,t=this._preloadDataList,n=this._wipPreloadTask,r=this._config.endPreloadTaskStrategy;this.cancel(),n&&(this.stepwise?"number"==typeof(null===(e=n.data)||void 0===e?void 0:e.stepIdx)&&n.data.stepIdx>-1&&n.data.stepIdx--:0!==r&&t.unshift(n),this._emitEvtByCancel(n.data),this._wipPreloadTask=void 0)}},{key:"stopCheckTask",value:function(){this._taskIntervalId&&(clearTimeout(this._taskIntervalId),this._taskIntervalId=-1)}},{key:"getPreloadMetaByVid",value:function(e,t){for(var n=this.getAllCachedDataKeys(),r=[],i="",o=0;o-1){var o=dn(n).call(n,r,1);this.log("log","cancelPreloadByVid remove from list",o.length>0&&o[0].data.vid)}var a=this._currentPreloadInst,s=a?a.getData():null;this.log("log","_currentPreloadInst",s),s&&s.vid===e&&this.cancel(),t&&this._addPlayingVid(t,e)}},{key:"removePlayingId",value:function(e){var t=this._playingVids,n=BR(t,"playerId",e);if(n>-1){var r=dn(t).call(t,n,1);this.log("log","removePlayingId",r.length>0&&r[0].playerId)}}},{key:"addPreload",value:(i=Mw(MD().mark(function e(t){return MD().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._addData(t);case 2:if(e.sent){e.next=5;break}return e.abrupt("return");case 5:this._sort(this._preloadDataList),this._checkAutoTask();case 7:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"_addData",value:(r=Mw(MD().mark(function e(t){var n,r,i,o,a,s,u,c,l,f=this;return MD().wrap(function(e){for(var h,d;;)switch(e.prev=e.next){case 0:if(t.data.vtype){e.next=3;break}return this.log("warn","vtype is null, can\xb7t select loader"),e.abrupt("return",!1);case 3:if(n=t.data,r=this._getLoader(n.vtype)){e.next=8;break}return this.log("warn","the loader for ".concat(n.vtype," not registered")),e.abrupt("return",!1);case 8:if(!((o=BR(i=this._playingVids,"vid",t.data.vid))>=0)){e.next=14;break}return a=i[o],this.log("log",ll(h="vid:".concat(a.vid," is already instantiated and loaded, playerId is ")).call(h,a.playerId)),e.abrupt("return");case 14:return s=this._getUniqueKey(t),e.next=17,this.getItem(t.data,!0);case 17:if(!(u=e.sent)||!r.isUniqueCache(u)){e.next=22;break}return this.log("log","".concat(s," already exist in cache")),e.abrupt("return",!1);case 22:if(!this._currentPreloadInst||!(c=this._currentPreloadInst.getData())||this._getUniqueKey({data:c,order:0})!==s){e.next=29;break}return this.log("log","currentKey repeat"),e.abrupt("return");case 29:if(l=lC(d=this._preloadDataList).call(d,function(e){return f._getUniqueKey(e)===s}),this.log("log","addedItems",s,l),0!==l.length){e.next=35;break}return this._stepwise&&void 0===t.data.steps&&(t.data.steps=[0]),this._preloadDataList.push(t),e.abrupt("return",!0);case 35:return this.log("log","".concat(s," already exist in preloadList")),e.abrupt("return",!1);case 37:case"end":return e.stop()}},e,this)})),function(e){return r.apply(this,arguments)})},{key:"_getUniqueKey",value:function(e){return e.data.vtype?a.generateUniqueCacheKey(e.data):e.data.vid}},{key:"_checkAutoTask",value:function(){var e=this,t=this._config,n=t.autoCheck,r=t.autoPreload;uA.resolve().then(function(){r&&e.emit(Mm.PRELOAD_NEXT),null!=n&&n.enable&&!e._taskIntervalId&&e.startCheckTask()})}},{key:"setItem",value:function(e,t,n,r){var i=a.generateUniqueCacheKey(e);if(!n){var o=this._getLoader(e.vtype);if(!o)return this.log("warn","no ".concat(e.vtype," preloader, register")),uA.resolve(!1);t=Mz({},o.generateUniqueKey(e),t)}return this._cacheInst.setItem(i,t,r)}},{key:"getItem",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=a.generateUniqueCacheKey(e),i=this._getLoader(e.vtype);if(!i)return this.log("warn","no ".concat(e.vtype," preloader, register")),uA.resolve(!1);var o=t?"":i.generateUniqueKey(e);return this._cacheInst.getItem(r,n,o)}},{key:"getItemSync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=a.generateUniqueCacheKey(e),i=this._getLoader(e.vtype);if(!i)return this.log("warn","no ".concat(e.vtype," preloader, register")),!1;var o=t?"":i.generateUniqueKey(e);return this._cacheInst.getItemSync(r,n,o)}},{key:"supportSync",value:function(){return this._cacheInst.supportSync()}},{key:"removeItem",value:function(e,t){var n=a.generateUniqueCacheKey(e);return this._cacheInst.removeItem(n,t)}},{key:"getPreLoadData",value:(n=Mw(MD().mark(function e(t){var n,r,i;return MD().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.vtype,!(r=this._getLoaderInst(n))){e.next=7;break}return e.next=5,r.getPreLoadData(t);case 5:return i=e.sent,e.abrupt("return",i);case 7:return e.abrupt("return",null);case 8:case"end":return e.stop()}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"getPreLoadDataSync",value:function(e){var t=e.vtype,n=this._getLoaderInst(t);return n?n.getPreLoadDataSync(e):null}},{key:"removeAll",value:function(){var e=this,t=this.getAllCachedDataKeys();uC(t).call(t,function(t){var n=e.getPreloadMetaByVid(t.split("#")[0]);n&&e.removeItem(n,null)})}},{key:"removeAllPreloadTask",value:function(){this.cancel(),this._preloadDataList=[],this._playingVids=[]}},{key:"disable",value:function(){this._isOpen=!1,this.stopCheckTask()}},{key:"enable",value:function(){this._isOpen=!0,this._config.autoCheck.enable&&!this._taskIntervalId&&this._preloadDataList.length>0&&this.startCheckTask()}},{key:"setUserSelectDefinition",value:function(e){this._userDefinition=e}},{key:"getUserSelectDefinition",value:function(){return this._userDefinition||null}},{key:"getStartDefinition",value:function(){return this._startDefinition}},{key:"setStartDefinition",value:function(e){this._startDefinition=e}},{key:"destroy",value:(t=Mw(MD().mark(function e(){var t,n,r,i;return MD().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this._stats.destroy(),t=uI(this._loaderInsts),n=0;case 3:if(!(n-1;n--){var r,i=this._preloadDataList[n];if(i.data.vid===e&&i.playerId===t){dn(r=this._preloadDataList).call(r,n,1);break}}}},{key:"getAllCachedDataKeys",value:function(){var e;return(null===(e=this._cacheInst)||void 0===e?void 0:e.getAllCachedDataKeys())||[]}},{key:"getDataUniqueKey",value:function(e){var t=this._getLoader(e.vtype);return!!t&&t.generateUniqueKey(e)}},{key:"hasItemSameVid",value:function(e){var t=this._getLoader(e.vtype),n=this._getLoaderInst(e.vtype);if(t&&n){var r=t.generateUniqueKey(e);return n.hasItemSameVid(r)}return!1}},{key:"_getLoader",value:function(e){return e=e||"",this._loaders[e]||this._loaders[e.toLocaleLowerCase()]||(this.log("warn","no ".concat(e," preloader, register")),null)}},{key:"_getLoaderInst",value:function(e){return e=e||"",this._loaderInsts[e]||this._loaderInsts[e.toLocaleLowerCase()]||(this.log("warn","no ".concat(e," preloader, register")),null)}},{key:"getPreloadMemoryInfo",value:function(){return this._cacheInst.getMemoryInfo()}},{key:"attachPlayer",value:function(e){this._player=e}},{key:"detachPlayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&this._player!==e||(this._player=null)}},{key:"setPreloadBandwidth",value:function(e,t){this._stats.setPreloadBandwidth(e,t)}},{key:"getPreloadBandwidth",value:function(e){return this._stats.getPreloadBandwidth(e)}},{key:"getLoadInfoAndDelete",value:function(e){return this._stats.getLoadInfoAndDelete(e)}},{key:"getPreloadUnuseInfo",value:function(){return this._stats.getPreloadUnuseInfo()}},{key:"setUsePreloadInfo",value:function(e,t){this._stats.setUsePreloadInfo(e,t)}},{key:"bwEventEmit",value:function(e){var t=e.vid,n=e.loadType,r=e.size,i=e.speed,o=e.cacheKey,a=e.vtype,s=e.duration,u=e.bitrate,c=MR(e,BD);this._stats.bwEventEmit(Mx({vid:t,loadType:n,size:r,speed:i,cacheKey:o,vtype:a,duration:s,bitrate:u},c))}},{key:"findPreloadItem",value:function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._stepwise){var r=fJ(e).call(e,function(e,t){return void 0===t.data.stepIdx||"number"==typeof t.data.stepIdx&&"number"==typeof e.data.stepIdx&&t.data.stepIdx1&&this._sort(i),t=i[0],!n){if("number"!=typeof t.data.stepIdx&&(t.data.stepIdx=-1),t.data.stepIdx++,ux(t.data.steps)&&t.data.stepIdx>=t.data.steps.length-1){var o=h6(e).call(e,t);dn(e).call(e,o,1)}t.data.stepIdx===1/0&&(t=void 0)}}else t=n?e[0]:e.shift();return t}},{key:"updateConfig",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this._config=uM({},a.getDefaultConfig(),e):uM(this._config,e);var t=this._config.autoCheck;t&&!t.enable&&this.stopCheckTask(),t&&t.enable&&this.startCheckTask()}},{key:"preProcessUrl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=this._config,r=n.preProcessUrl,i=n.preProcessUrlOptions;return"function"==typeof r?r(e,uM({},i,t)):{url:e}}}],[{key:"getDefaultConfig",value:function(){return{autoPreload:!1,autoCheck:{enable:!1,interval:1e3},preloadMaxCacheCount:5,preloadCacheType:My.MEMORY,autoCheckPreload:!0,startPreloadControl:!1,startPreloadMinBuffer:5,startPreloadMinPosTime:5,minBufferLength:5,endPreloadControl:!1,endPreloadTaskStrategy:0}}},{key:"generateUniqueCacheKey",value:function(e){var t,n,r=e.vid,i=e.codecType,o=e.vtype;return ll(t=ll(n="".concat(r,"#")).call(n,i,"#")).call(t,o.toUpperCase())}},{key:"parseKey",value:function(e){if(!e)throw Error("key ".concat(e," is empty"));var t=e.split("#");if(t.length<6)throw Error("key ".concat(e," is not right format"));return{vid:t[0],mediaType:t[1],codecType:t[2],vtype:t[3],definition:t[4],bitrate:hl("".concat(t[5]||0),10)||0}}},{key:"debugger",set:function(e){BP=!!e}}])}();function BL(e){return(null==e?void 0:e.preLoadMeta)||{}}var BM=((l=BM||{})[l.NORMAL=0]="NORMAL",l[l.FEED=1]="FEED",l),BB=new(function(){var e,t;function n(){uE(this,n),oX(this,"isRegistered",!1),oX(this,"initPromise",void 0),oX(this,"_inst",void 0),oX(this,"_tracker",void 0),oX(this,"pendingLoadList",[]),oX(this,"prevCount",1),oX(this,"nextCount",2),oX(this,"preloadScene",BM.NORMAL)}return uz(n,[{key:"bitrateSelector",get:function(){var e;return null===(e=this._inst)||void 0===e?void 0:e._selector}},{key:"prepare",value:(t=uk(uw().mark(function e(t){var n;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isRegistered){e.next=1;break}return e.abrupt("return",!0);case 1:return this.initPromise||(this.initPromise=this._init(t)),e.next=2,null!==(n=this.initPromise)&&void 0!==n&&n;case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"register",value:function(e){if(!this.isRegistered){var t=oJ(oJ({},e),{},{preloadScene:(null==e?void 0:e.preloadScene)||BM.NORMAL});this._register(this._adaptPreloadConfig(t)),this.isRegistered=!0,this.trackPreloadData()}}},{key:"inst",value:function(){return this._inst}},{key:"addPreloadList",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isRegistered){if(null==n||!n.delayAdd)return this._addPreloadList(e);if(BM.FEED!==this.preloadScene)return BM.NORMAL===this.preloadScene?this._addPreloadList(e):void 0;this.pendingLoadList=ll(t=this.pendingLoadList).call(t,null!=e?e:[])}}},{key:"setPreloadList",value:function(e){if(this.isRegistered){if(BM.FEED!==this.preloadScene)return BM.NORMAL===this.preloadScene?this._addPreloadList(e):void 0;this.pendingLoadList=null!=e?e:[]}}},{key:"clearPreloadList",value:function(){this.pendingLoadList=[]}},{key:"attachPlayer",value:function(e){var t,n;e&&this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(n=t.attachPlayer)||void 0===n||n.call(t,e))}},{key:"detachPlayer",value:function(e){var t,n;this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(n=t.detachPlayer)||void 0===n||n.call(t,e))}},{key:"configure",value:function(e){return this.updateConfig(e)}},{key:"setPreloadScene",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.preloadScene,t=arguments.length>1?arguments[1]:void 0;return this.preloadScene!==e&&this.clearPreloadList(),this.updateConfig(oJ({preloadScene:e},null!=t?t:{}))}},{key:"removeAll",value:function(){var e,t;return null===(e=this._inst)||void 0===e||null===(t=e.removeAll)||void 0===t?void 0:t.call(e)}},{key:"removeAllPreloadTask",value:function(){var e,t;return this.pendingLoadList=[],null===(e=this._inst)||void 0===e||null===(t=e.removeAllPreloadTask)||void 0===t?void 0:t.call(e)}},{key:"bindTracker",value:function(e){this._tracker=e}},{key:"checkPreloadData",value:function(e){var t;if(null!==(t=this.pendingLoadList)&&void 0!==t&&t.length&&e){var n=this._recPreloadList(e);null!=n&&n.length&&this._addPreloadList(n)}}},{key:"checkPreloadDataExist",value:function(e){var t,n=BL(SN(e));return!!(null===(t=this._inst)||void 0===t?void 0:t.hasItemSameVid(n))}},{key:"addPlayingId",value:function(e,t){var n;null===(n=this._inst)||void 0===n||n.addPlayingId(e,t)}},{key:"removePlayingId",value:function(e){var t;null===(t=this._inst)||void 0===t||t.removePlayingId(e)}},{key:"getDataUniqueKey",value:function(e){var t;return null===(t=this._inst)||void 0===t?void 0:t.getDataUniqueKey(e)}},{key:"getPreloadMetaByVid",value:function(e,t){var n;return null===(n=this._inst)||void 0===n?void 0:n.getPreloadMetaByVid(e,t)}},{key:"setPreloadData",value:function(e,t){if("DASH"===(null==e?void 0:e.vtype)){var n,r=null===(n=this._inst)||void 0===n?void 0:n.getItemSync(e,!0);if(r){var i,o,a=lD(t).call(t,function(e){return e.cacheKey}),s=[];uC(i=uI(r)).call(i,function(e){if(!fl(a).call(a,e)){var t=r[e];t.cacheKey||(t.cacheKey=e),s.push(r[e])}}),s=ll(s).call(s,t);var u=this._tranfserToCacheData(s);null===(o=this._inst)||void 0===o||o.setItem(e,u,!0)}else{var c,l=this._tranfserToCacheData(t);null===(c=this._inst)||void 0===c||c.setItem(e,l,!0)}}}},{key:"_tranfserToCacheData",value:function(e){for(var t={},n=0;n0)u.push({type:"mixed",start:0,data:s.buffer,dur:s.duration||0});else if(a){var c,l={audioDuration:0,byteLength:0,preloadTime:0};uC(c=uI(s)).call(c,function(e){var t=s[e],n=t.isInitSegment;l.byteLength+=t.res.byteLength,"video"===t.mediaType?l.preloadTime+=t.duration||0:l.audioDuration+=t.duration||0,u.push({type:"mixed",start:0,data:t.res,dur:n?0:t.duration||5,cacheKey:e,range:t.range})}),s=l}return{preloadData:s,preloadDataList:u}}},{key:"getCachedBitrate",value:function(e){var t,n,r=e.config,i=(r.shared||r).definition,o=(null==i?void 0:i.list)||[],a=null==i?void 0:i.userSelectDefinition,s=null==i?void 0:i.focusUserDefinition,u=r.vid||(null===(t=r.baseConfig)||void 0===t||null===(t=t.mediaInfo)||void 0===t?void 0:t.vid)||(null===(n=r.baseConfig)||void 0===n||null===(n=n.mediaInfo)||void 0===n?void 0:n.id)||"",c=null;if(o.length>0){var l=this.getPreloadMetaByVid(u);if(l){var f=this.getDataUniqueKey(l),h=function(e,t){for(var n,r=e.vtype,i=e.codecType,o=e.definition,a=e.bitrate,s=null,u=0;n=t[u];u++){var c=n.vtype===r;if(c&&(c=n.codecType===i),c&&(c=n.definition===o||n.definition===Number(o)),c&&(c=!n.bitrate||!a||Number(n.bitrate)===Number(a)),c){s=n;break}}return s}(l,o);h&&(h.cacheKey=f,(c=h).type=SF.PRELOAD,c.preLoadMeta=l)}if(c&&a&&s){var d={m:1,ud:a,d:c.definition};a!==c.definition&&(c=null,d.m=1)}}return c}},{key:"_init",value:(e=uk(uw().mark(function e(t){var n,r,i;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t){e.next=2;break}return e.next=1,t();case 1:i=e.sent,e.next=3;break;case 2:i=t;case 3:if((r=i).PreloaderModule=r.PreloaderModule||BO,null!=r&&r.PreloaderModule&&null!=r&&null!==(n=r.loaders)&&void 0!==n&&n.length){e.next=4;break}return e.abrupt("return",!1);case 4:return r.enableDebugger&&(r.PreloaderModule.debugger=r.enableDebugger),this.register(r),e.abrupt("return",!0);case 5:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"_addPreloadList",value:function(e){if(null!=e&&e.length){var t,n=null!=(t=e)&&t.length?lD(t).call(t,function(e){var t,n;if("data"in e)return e;return{order:1,data:{vid:e.vid,vtype:(null===(t=e.streamType)||void 0===t||null===(n=t.toUpperCase)||void 0===n?void 0:n.call(t))||"MP4",codecType:e.codec||"h264",payload:[{url:ux(e.url)?e.url:[{src:e.url}],bitrate:e.bitrate,definition:e.definition,duration:e.duration,size:e.size}],defaultDefinition:e.definition,bizType:0}}}):[];null!=n&&n.length&&this._addList(n)}}},{key:"trackPreloadData",value:function(){var e,t,n=this;null===(e=this._inst)||void 0===e||null===(t=e.on)||void 0===t||t.call(e,"prf_data_size",function(e){var t,r;null===(t=n._tracker)||void 0===t||null===(r=t.track)||void 0===r||r.call(t,"vestrategy_preload_prf_data_size",oJ({},e))})}},{key:"_register",value:function(e){var t,r,i=this,o=e||{},a=o.playPlugins,s=o.loaders,u=o.preloader;if(BO&&null!=s&&s.length){e.enableDebugger&&(BO.debugger=e.enableDebugger);var c=u||(void 0!==SM?SM:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).playerPreloader;c?this._inst=c:(this._inst=new BO,this._inst.register({config:uM({},n.defaultConfig,(null==e?void 0:e.config)||e),loaders:lC(s).call(s,function(e){return!!e}),BitrateSelector:e.BitrateSelector})),null!=a&&a.length&&uC(a).call(a,function(e){var t;null==e||null===(t=e.registerPreloader)||void 0===t||t.call(e,i._inst)}),null===(t=this._inst)||void 0===t||null===(r=t.enable)||void 0===r||r.call(t)}}},{key:"updateConfig",value:function(e){var t,n;e&&this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(n=t.updateConfig)||void 0===n||n.call(t,this._adaptPreloadConfig(e)))}},{key:"_addList",value:function(e){var t,n;null!=e&&e.length&&this.isRegistered&&(null===(t=this._inst)||void 0===t||null===(n=t.addPreloadList)||void 0===n||n.call(t,e))}},{key:"_adaptPreloadConfig",value:function(e){var t,n,r;return this.nextCount=null!==(t=null==e?void 0:e.nextCount)&&void 0!==t?t:this.nextCount,this.prevCount=null!==(n=null==e?void 0:e.prevCount)&&void 0!==n?n:this.prevCount,void 0!==(null==e?void 0:e.preloadScene)&&fl(r=[BM.FEED,BM.NORMAL]).call(r,null==e?void 0:e.preloadScene)?(this.preloadScene=e.preloadScene,BM.FEED===e.preloadScene?oJ({autoPreload:!1,autoCheckPreload:!0},e):oJ({autoPreload:!0,autoCheckPreload:!1},e)):oJ({},e)}},{key:"_recPreloadList",value:function(e){var t,n=this.pendingLoadList;if(!e||null==n||!n.length)return[];var r=Mg(n).call(n,function(t){var n;return t.vid===e||(null===(n=t.data)||void 0===n?void 0:n.vid)===e});if(-1===r)return[];var i=this.prevCount?pv(n).call(n,r-this.prevCount<0?0:r-this.prevCount,r):[],o=this.nextCount?pv(n).call(n,r+1,r+this.nextCount+1):[];return lC(t=ll(o).call(o,i)).call(t,function(e){return!!e})}}],[{key:"defaultConfig",get:function(){return{preloadCacheType:1,autoPreload:!0,autoCheckPreload:!1,autoCheck:{enable:!0,interval:1e3},preloadTime:5,preloadMaxCacheCount:15,startPreloadMinBuffer:5,startPreloadControl:!0,startPreloadMinPosTime:0,minBufferLength:15,segmentMinDuration:5,loadRangeType:"gop"}}}])}()),BN=new l9("VeStrategy-preload-plugin"),BU=function(){function e(t){var n,r,i,o,a;return uE(this,e),oX((i=this,o=e,a=[t],o=lV(o),r=lP(i,lG()?lW(o,a||[],lV(i).constructor):o.apply(i,a))),"ctx",void 0),oX(r,"preloader",void 0),oX(r,"playerId",void 0),oX(r,"_onPreloadCache",function(e){if(e&&e.keyData&&ux(e.transferPreload)){var t,n=e.keyData,i=e.transferPreload;null===(t=r.preloader)||void 0===t||t.setPreloadData(n,i)}}),oX(r,"_onPlayerActiveChange",function(){r._initPreloader()}),oX(r,"_checkPreloadData",function(){var e,t,n,i;if(r.preloader&&r.player){var o=r.playerConfig,a=(null===(e=o.baseConfig)||void 0===e||null===(e=e.mediaInfo)||void 0===e?void 0:e.id)||(null===(t=o.shared)||void 0===t?void 0:t.vid);null===(n=(i=r.preloader).checkPreloadData)||void 0===n||n.call(i,a)}}),r.ctx=r.config.ctx,r.preloader=r.config.preloader,BN.update(null===(n=r.ctx)||void 0===n||null===(n=n.dataCenter)||void 0===n||null===(n=n.getAppConfig())||void 0===n?void 0:n.log),BN.info("PreloadPluginInitCompleted"),function(e,t){var n,r=null;try{r=(null===(n=e.getProperty)||void 0===n?void 0:n.call(e,t))||e[t]}catch(e){}return r}(r.player,"preloader")||SU(r.player,"preloader",BB),r}return lK(e,lq),uz(e,[{key:"beforePlayerInit",value:function(){(t=e,n="beforePlayerInit",r=this,i=3,o=Lj(lV(1&3?t.prototype:t),n,r),2&i&&"function"==typeof o?function(e){return o.apply(r,e)}:o)([]);var t,n,r,i,o,a=this.preloader,s=Sj(this.player);this.playerId=this.player.playerId,this._initPreloader(),s&&this.playerId&&(null==a||a.addPlayingId(s,this.playerId));var u=this._getCachedBitrate();u&&SB(this.player,u);var c=SN(this.player);if(null!=a&&a.checkPreloadDataExist(this.player)||s&&null!=a&&a.getPreloadMetaByVid(s)&&"DASH"===c.vtype){var l=a.getPreloadDataInfo(this.player),f=l.preloadData,h=l.preloadDataList;if(ux(h)&&h.length>0){this.setBaseConfig({preloadDataInfo:{preloadDataList:h}});var d=f.byteLength||0,p=f.preloadTime||(null==h?void 0:fJ(h).call(h,function(e,t){return e+(t.dur||0)},0))||0;SU(this.player,"preloadData",{byteLength:d,duration:p,audioDuration:f.audioDuration||0})}}else if(this.config.needPreloadCheck)return void this.player.emit("degrade",{category:SG.PRELOAD_NOT_HIT,errc:-1,err_msg:"preload data not exist"})}},{key:"beforeDestroy",value:function(){var e;this.playerId&&(null===(e=this.preloader)||void 0===e||e.removePlayingId(this.playerId)),this.preloader=void 0,this.playerId=void 0,this._unbindEvents()}},{key:"afterPlayerInit",value:function(){this._bindEvents()}},{key:"_bindEvents",value:function(){this.player&&(this.player.on("user_active_change",this._onPlayerActiveChange),this.player._core&&this.player._core.on("webcodec_preload_cache",this._onPreloadCache))}},{key:"_unbindEvents",value:function(){this.player&&(this.player.off("user_active_change",this._onPlayerActiveChange),this.player._core&&this.player._core.off("webcodec_preload_cache",this._onPreloadCache))}},{key:"_initPreloader",value:function(){var e,t,n=this.player,r=this.preloader;n.isUserActive?null==r||null===(e=r.attachPlayer)||void 0===e||e.call(r,n):null==r||null===(t=r.detachPlayer)||void 0===t||t.call(r,n),this._checkPreloadData()}},{key:"_getCachedBitrate",value:function(){var e,t=this.playerConfig,n=this.preloader,r=(t.shared||t).definition,i=(null==r?void 0:r.list)||[],o=t||r||{},a=o.userSelectDefinition,s=o.focusUserDefinition;if(null==n||!n.isRegistered)return e;if(ux(i)&&i.length>0&&(n&&(e=n.getCachedBitrate(this.player)),e&&a&&s)){var u={m:1,ud:a,d:e.definition};a!==e.definition&&(e=void 0,u.m=1)}return e}}],[{key:"pluginName",get:function(){return"AutoPreloadPlugin"}},{key:"defaultConfig",get:function(){return{}}}])}(),Bj=uz(function e(t,n,r,i,o,a){uE(this,e),oX(this,"type",void 0),oX(this,"codecs",void 0),oX(this,"visualEntryBox",void 0),oX(this,"configurationBox",void 0),oX(this,"types",void 0),oX(this,"logCodeType",void 0),this.type=t,this.codecs=n,this.visualEntryBox=r,this.configurationBox=i,this.types=o,this.logCodeType=a}),BF="avc",BG="av1",BV="hevc",BH="bytevc1",BK="bytevc2",BW="bvc2";oX(oX(oX(oX(oX(oX({},BF,new Bj("avc","avc1.64001E","avc1","avcC",["h264"],"h264")),BG,new Bj("av1","av01.0.08M.08","av01","av1C",["av1"],"av1")),BV,new Bj("hevc","hev1.1.6.L120.90","hvc1","hvcC",["h265"],"h265")),BH,new Bj("hevc","hev1.1.6.L120.90","hvc1","hvcC",["bytevc1","h265"],"h265")),BW,new Bj("bvc2","bvc2.1.6.L93.B0","bvc2","bvc2",["h266"],"h266")),BK,new Bj("bvc2","bvc2.1.6.L93.B0","bvc2","bvc2",["bytevc2","h266"],"h266"));var Bq=new l9("VeStrategy-preload"),BY=function(){var e,t;function n(e){var t,r,i,o,a,s;return uE(this,n),o=this,a=n,s=[e],a=lV(a),i=lP(o,lG()?lW(a,s||[],lV(o).constructor):a.apply(o,s)),BB.bindTracker(null==e||null===(t=e.ctx)||void 0===t?void 0:t.tracker),Bq.update(null===(r=e.ctx.dataCenter)||void 0===r||null===(r=r.getAppConfig())||void 0===r?void 0:r.log),Bq.info("VeStrategyPreloadInit"),i}return lK(n,lZ),uz(n,[{key:"getRecommendation",value:function(e){var t={plugins:[],pluginConfiguration:{},result:{enable:!1}};return!1!==this.config.disableAutoCheckPlugin&&(t.plugins=[BU],t.pluginConfiguration=oX({},BU.pluginName,oJ({preloader:BB},this.config))),t.result={enable:!0},!1===e.recResult&&delete t.result,t}}],[{key:"prepare",value:(t=uk(uw().mark(function e(t){var n,r,i,o,a;return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.config,r=t.loaders,i=t.preloader,o=t.useBitrateSelector,e.next=1,this.preloader.prepare({config:n,loaders:r,preloader:i,BitrateSelector:o?Lb:null});case 1:return a=e.sent,this._checkSelectorConfig(),e.abrupt("return",a);case 2:case"end":return e.stop()}},e,this)})),function(e){return t.apply(this,arguments)})},{key:"addPreloadList",value:(e=uk(uw().mark(function e(t){return uw().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this._checkSelectorConfig(),this.preloader.addPreloadList(t);case 1:case"end":return e.stop()}},e,this)})),function(t){return e.apply(this,arguments)})},{key:"_checkSelectorConfig",value:function(){var e=this.preloader.bitrateSelector;e&&(!e.defaultConfig||e.defaultConfig.mode&&e.defaultConfig.mode===Lb.defaultConfig.mode||(e.defaultConfig=uM(e.defaultConfig,Lb.defaultConfig)))}}])}();oX(BY,"strategyName",l5.preload),oX(BY,"strategyPriority",l3.preload),oX(BY,"preloader",BB);var BZ=new l9("VeStrategy-testspeed"),BX=function(){function e(t){var n,r,i,o,a;return uE(this,e),i=this,o=e,a=[t],o=lV(o),r=lP(i,lG()?lW(o,a||[],lV(i).constructor):o.apply(i,a)),BZ.update(null===(n=t.ctx.dataCenter)||void 0===n||null===(n=n.getAppConfig())||void 0===n?void 0:n.log),BZ.info("VeStrategy TestSpeed Init"),r}return lK(e,lZ),uz(e,[{key:"getRecommendation",value:function(e){var t={plugins:[],pluginConfiguration:{},result:{enable:!1}};return this.config.disableAutoCheckPlugin||(t.plugins=[O9],t.pluginConfiguration=oX({},O9.pluginName,oJ({},this.config))),t.result=oJ({},this.config),!1===e.recResult&&delete t.result,t}}])}();oX(BX,"strategyName",l5.testSpeed),oX(BX,"strategyPriority",l3.testSpeed);var BQ=function(){function e(t){var n,r,i;return uE(this,e),n=this,r=e,i=[t],r=lV(r),lP(n,lG()?lW(r,i||[],lV(n).constructor):r.apply(n,i))}return lK(e,lq),uz(e,[{key:"beforePlayerInit",value:function(){var e=this.playerConfig,t=e.baseConfig,n=t.preProcessUrl,r=t.urlList,i=t.url;if(n){r&&ux(r)&&this._processUrls(r),i&&("string"==typeof i?e.baseConfig.url=n(i):ux(i)&&this._processUrls(i));var o=e.shared.definition,a=(null==o?void 0:o.list)||[],s=(null==o?void 0:o.extraList)||[];if((a=ll(a).call(a,s))&&ux(a))for(var u=0;u>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-o)&63)):n.push("=")}return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}},e.exports=n},297080:function(e,t,n){"use strict";n.d(t,{u:function(){return i}});var r={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function i(e){return e?r[e]:r.trunc}},942155:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw TypeError("The listener must be a function");var s=new i(r,o||e,a),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],s]:e._events[u].push(s):(e._events[u]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),!new r().__proto__&&(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=Array(o);i=0)&&(i[n]=e[n]);return i}(e,s);return r.createElement(o.default,{axis:p,draggableOpts:u,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:d,maxConstraints:f,minConstraints:c,onResizeStart:i,onResize:this.onResize,onResizeStop:a,resizeHandles:v,transformScale:y,width:this.state.width},r.createElement("div",l({},m,{style:h(h({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},i}(r.Component);t.default=p,p.propTypes=h(h({},a.resizableProps),{},{children:i.default.element})},448669:function(e,t,n){"use strict";e.exports=n(129222)},158364:function(e,t,n){"use strict";n.r(t)},667031:function(e,t,n){"use strict";n.r(t)},391909:function(e,t,n){"use strict";n.r(t)},528665:function(e,t,n){"use strict";n.r(t)},749485:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}}),n(932651);var r=n(101199),i=n(622689),o=n.n(i),a=n(711004);n(687100);var s=n(559748),u=n(600436),c=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);it.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};let l=a.UX.PREFIX,f=`${l}-key`,h=`${l}-value`;class d extends r.PureComponent{render(){let e=this.props,{itemKey:t,hidden:n,className:i,span:o,style:a,children:u}=e,d=c(e,["itemKey","hidden","className","span","style","children"]),{align:p,layout:v}=this.context;if(n)return null;let g=r.createElement("td",{className:`${l}-item`,colSpan:o||1},r.createElement("span",{className:f},t,":"),r.createElement("span",{className:h},"function"==typeof u?u():u)),y=r.createElement(r.Fragment,null,r.createElement("th",{className:`${l}-item ${l}-item-th`},r.createElement("span",{className:f},t)),r.createElement("td",{className:`${l}-item ${l}-item-td`,colSpan:o?2*o-1:1},r.createElement("span",{className:h},"function"==typeof u?u():u))),m="plain"===p?r.createElement("tr",Object.assign({className:i,style:a},(0,s.Z)(d)),g):r.createElement("tr",Object.assign({className:i,style:a},(0,s.Z)(d)),y),_="plain"===p?g:y;return"horizontal"===v?_:m}}d.propTypes={itemKey:o().node,hidden:o().bool,className:o().string,style:o().object},d.contextType=u.Z},986579:function(e,t,n){"use strict";n(932651);var r=n(101199),i=n(469935),o=n.n(i),a=n(622689),s=n.n(a),u=n(702552),c=n(361965),l=n(103772),f=n(426337),h=n(284592);n(562600);let d=c.U.PREFIX;class p extends f.Z{componentDidMount(){this.foundation.init()}componentDidUpdate(e){}componentWillUnmount(){this.foundation.destroy()}get adapter(){var e=this;return Object.assign(Object.assign({},super.adapter),{getResizable:this.getResizable,registerEvent:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mouse",n=e.foundation.window;"mouse"===t?(null==n||n.addEventListener("mouseup",e.foundation.onMouseUp),null==n||n.addEventListener("mousemove",e.foundation.onMouseMove),null==n||n.addEventListener("mouseleave",e.foundation.onMouseUp)):(null==n||n.addEventListener("touchmove",e.foundation.onTouchMove,{passive:!1}),null==n||n.addEventListener("touchend",e.foundation.onMouseUp),null==n||n.addEventListener("touchcancel",e.foundation.onMouseUp))},unregisterEvent:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mouse",n=e.foundation.window;"mouse"===t?(null==n||n.removeEventListener("mouseup",e.foundation.onMouseUp),null==n||n.removeEventListener("mousemove",e.foundation.onMouseMove),null==n||n.removeEventListener("mouseleave",e.foundation.onMouseUp)):(null==n||n.removeEventListener("touchmove",e.foundation.onTouchMove,{passive:!1}),null==n||n.removeEventListener("touchend",e.foundation.onMouseUp),null==n||n.removeEventListener("touchcancel",e.foundation.onMouseUp))}})}render(){var e;let{className:t,style:n,children:i,maxHeight:a,maxWidth:s,minHeight:u,minWidth:c}=this.props,l=Object.assign(Object.assign({userSelect:this.state.isResizing?"none":"auto",maxWidth:s,maxHeight:a,minWidth:c,minHeight:u},n),this.foundation.sizeStyle);return(null===(e=this.state)||void 0===e?void 0:e.flexBasis)&&(n.flexBasis=this.state.flexBasis),r.createElement("div",Object.assign({style:l,className:o()(t,d+"-resizable"),ref:this.resizableRef},this.getDataAttr(this.props)),this.state.isResizing&&r.createElement("div",{style:this.state.backgroundStyle,className:o()(t,d+"-background")}),i,this.renderResizeHandler())}constructor(e){var t,n;super(e),this.getResizable=()=>{var e;return null===(e=this.resizableRef)||void 0===e?void 0:e.current},this.renderResizeHandler=()=>{let{enable:e,handleStyle:t,handleClass:n,handleNode:i,handleWrapperStyle:o,handleWrapperClass:a}=this.props;if(!e)return null;let s=l.q.map(o=>{var a;return!1!==e[o]?r.createElement(h.Z,{key:o,direction:o,onResizeStart:this.foundation.onResizeStart,style:t&&t[o],className:n&&n[o]},null!==(a=null==i?void 0:i[o])&&void 0!==a?a:null):null});return r.createElement("div",{className:a,style:o},s)},this.resizableRef=(0,r.createRef)(),this.foundation=new u.j(this.adapter),this.state={isResizing:!1,width:null!==(t=this.foundation.propSize.width)&&void 0!==t?t:"auto",height:null!==(n=this.foundation.propSize.height)&&void 0!==n?n:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{cursor:"auto"},flexBasis:void 0}}}p.propTypes={style:s().object,className:s().string,grid:s().arrayOf(s().number),snap:s().shape({x:s().arrayOf(s().number),y:s().arrayOf(s().number)}),snapGap:s().number,bounds:s().oneOf(["parent","window",s().node]),boundsByDirection:s().bool,size:s().object,minWidth:s().oneOfType([s().string,s().number]),minHeight:s().oneOfType([s().string,s().number]),maxWidth:s().oneOfType([s().string,s().number]),maxHeight:s().oneOfType([s().string,s().number]),lockAspectRatio:s().oneOfType([s().bool,s().number]),lockAspectRatioExtraWidth:s().number,lockAspectRatioExtraHeight:s().number,enable:s().object,handleStyle:s().object,handleClass:s().object,handleWrapperStyle:s().object,handleWrapperClass:s().string,handleNode:s().object,children:s().object,onResizeStart:s().func,onChange:s().func,onResizeEnd:s().func,defaultSize:s().object,scale:s().number,ratio:s().oneOfType([s().number,s().arrayOf(s().number)])},p.defaultProps={onResizeStart:()=>{},onChange:()=>{},onResizeEnd:()=>{},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,ratio:1,snapGap:0},t.Z=p},821811:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}}),n(932651),n(490629);var r=n(795233),i=n.n(r),o=n(101199),a=n(426337),s=n(469935),u=n.n(s),c=n(622689),l=n.n(c),f=n(278766),h=n(111906),d=n(873827);class p extends a.Z{get adapter(){var e=this;return Object.assign(Object.assign({},super.adapter),{notifyChange:function(){return e.props.onChange(...arguments)}})}render(){let{selected:e,getCheckboxProps:t,indeterminate:n,disabled:r,prefixCls:i,className:a}=this.props,s=this.props["aria-label"],c={onChange:this.handleChange,disabled:r,indeterminate:n,checked:e};"function"==typeof t&&(c=Object.assign(Object.assign({},c),t()));let l=u()(`${i}-selection-wrap`,{[`${i}-selection-disabled`]:r},a);return o.createElement("span",{className:l},o.createElement(d.Z,Object.assign({"aria-label":s},c)))}constructor(e){super(e),this.handleChange=e=>this.foundation.handleChange(e),this.foundation=new h.Z(this.adapter)}}p.propTypes={columnTitle:l().string,getCheckboxProps:l().func,type:l().string,onChange:l().func,selected:l().bool,disabled:l().bool,indeterminate:l().bool,prefixCls:l().string,className:l().string,"aria-label":l().string},p.defaultProps={disabled:!1,onChange:i(),prefixCls:f.UX.PREFIX}},12929:function(e,t,n){"use strict";var r=n(101199);t.Z=()=>r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"41",height:"30",viewBox:"0 0 41 30",fill:"none"},r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.875 4.5C3.875 3.67157 4.54657 3 5.375 3H29.375C30.2034 3 30.875 3.67157 30.875 4.5V11.0446C30.875 11.9448 31.9714 12.3866 32.5956 11.7379L36.2647 7.92487C36.5768 7.60054 37.125 7.82146 37.125 8.27156V21.7284C37.125 22.1785 36.5768 22.3995 36.2647 22.0751L32.5956 18.2621C31.9714 17.6134 30.875 18.0552 30.875 18.9554V25.5C30.875 26.3284 30.2034 27 29.375 27H5.375C4.54657 27 3.875 26.3284 3.875 25.5V4.5ZM5.375 0C2.88972 0 0.875 2.01472 0.875 4.5V25.5C0.875 27.9853 2.88972 30 5.375 30H29.375C31.8603 30 33.875 27.9853 33.875 25.5V23.9183L34.103 24.1553C36.2876 26.4256 40.125 24.8792 40.125 21.7284V8.27156C40.125 5.12082 36.2876 3.5744 34.103 5.84475L33.875 6.08167V4.5C33.875 2.01472 31.8603 0 29.375 0H5.375ZM13.875 10.5C13.875 9.67157 13.2034 9 12.375 9C11.5466 9 10.875 9.67157 10.875 10.5V14.5C10.875 15.3284 11.5466 16 12.375 16C13.2034 16 13.875 15.3284 13.875 14.5V10.5ZM23.875 9C24.7034 9 25.375 9.67157 25.375 10.5V14.5C25.375 15.3284 24.7034 16 23.875 16C23.0466 16 22.375 15.3284 22.375 14.5V10.5C22.375 9.67157 23.0466 9 23.875 9ZM12.6231 22.3321C13.3039 21.3108 14.9319 20 18.375 20C20.192 20 21.3252 20.2374 22.1317 20.611C22.9124 20.9727 23.5161 21.5215 24.175 22.4C24.6721 23.0627 25.6123 23.1971 26.275 22.7C26.9377 22.2029 27.0721 21.2627 26.575 20.6C25.7339 19.4785 24.7706 18.5273 23.3928 17.889C22.0407 17.2626 20.424 17 18.375 17C14.0862 17 11.4461 18.6892 10.1269 20.6679C9.6674 21.3572 9.85366 22.2885 10.5429 22.7481C11.2322 23.2076 12.1635 23.0213 12.6231 22.3321Z",fill:"#F9F9F9",fillOpacity:"0.8"}))},274402:function(e,t,n){"use strict";n.d(t,{EB:function(){return r},GH:function(){return i},v7:function(){return o},zN:function(){return a}}),n(480333),n(683656),n(759943),n(992871),n(490629),n(228983),n(104882),n(706056),n(656562);let r=e=>e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`),i=()=>"undefined"!=typeof TransformStream&&"undefined"!=typeof RTCRtpSender&&"undefined"!=typeof RTCRtpReceiver&&void 0!==RTCRtpSender.prototype.createEncodedStreams&&void 0!==RTCRtpReceiver.prototype.createEncodedStreams,o=()=>"undefined"!=typeof RTCEncodedVideoFrame&&"headerExtensionSupported"in RTCEncodedVideoFrame,a=e=>{let t=new URLSearchParams(e.split("?")[1]),n={};return t.forEach((e,t)=>{n[t]=e}),n}},571553:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}}),n(932651);var r=n(856445);class i extends r.Z{constructor(e){super(Object.assign({},e)),this.showDeletePopup=()=>{this._adapter.setVisible(!0),this._adapter.setShowAction(!0),this._adapter.registerClickOutsideHandler(this.hideDeletePopup)},this.hideDeletePopup=()=>{this._adapter.setVisible(!1),setTimeout(()=>{this._adapter.setShowAction(!1)},150),this._adapter.unregisterClickOutsideHandler()},this.destroy=()=>{this._adapter.unregisterClickOutsideHandler()},this.deleteMessage=()=>{this._adapter.notifyDeleteMessage()},this.copyMessage=()=>{this._adapter.notifyMessageCopy(),this._adapter.copyToClipboardAndToast()},this.likeMessage=()=>{this._adapter.notifyLikeMessage()},this.dislikeMessage=()=>{this._adapter.notifyDislikeMessage()},this.resetMessage=()=>{this._adapter.notifyResetMessage()}}}},148574:function(e,t,n){"use strict";n(490629);t.Z=(e,t)=>{let n=new Date().getFullYear(),r="number"==typeof e?e:n-100,i="number"==typeof t?t:n+100;return ir+t)}},192231:function(e,t,n){"use strict";n.d(t,{KT:function(){return o},UX:function(){return i}});var r=n(707852);let i={PREFIX:`${r.T}-page`},o={PAGE_SHOW_MAX:7,REST_PAGE_SHOW_MAX:5,DEFAULT_PAGE_SIZE:10,PAGE_SIZE_OPTION:[10,20,40,100],REST_PAGE_MAX_SIZE:1e6}},361965:function(e,t,n){"use strict";n.d(t,{U:function(){return i}});var r=n(707852);let i={PREFIX:`${r.T}-resizable`}},907829:function(e,t,n){"use strict";n(932651);var r=n(101199);function i(){return(i=Object.assign||function(e){for(var t=1;te instanceof o},835952:function(e,t,n){"use strict";n.d(t,{D:function(){return i},F:function(){return o}});var r=!1;function i(e){r=e}function o(){return r}},589793:function(e,t,n){"use strict";n.d(t,{e:function(){return c}});var r=n(914803),i=n(845909),o=n(343894),a=n(7048);let s={}.hasOwnProperty,u={};function c(e,t){let n=t||u,o=new Map,c=new Map,v=new Map,g={all:function(e){let t=[];if("children"in e){let n=e.children,r=-1;for(;++r0&&n.push({type:"text",value:"\n"}),n}function p(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}},37906:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var r=n(552357),i=n(341966);function o(e,t,n){let o=((0,i.T)(n)+(n.options.ruleSpaces?" ":"")).repeat((0,r.t)(n));return n.options.ruleSpaces?o.slice(0,-1):o}},343894:function(e,t,n){"use strict";n.d(t,{FK:function(){return a},Pk:function(){return i},rb:function(){return r}});let r=o("end"),i=o("start");function o(e){return function(t){let n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function a(e){let t=i(e),n=r(e);if(t&&n)return{start:t,end:n}}},75924:function(e,t,n){"use strict";n.d(t,{BK:function(){return a},S4:function(){return s}});var r=n(645361),i=n(411142);let o=[],a=!1;function s(e,t,n,s){let u;"function"==typeof t&&"function"!=typeof n?(s=n,n=t):u=t;let c=(0,r.O)(u),l=s?-1:1;(function e(r,u,f){let h=r&&"object"==typeof r?r:{};if("string"==typeof h.type){let e="string"==typeof h.tagName?h.tagName:"string"==typeof h.name?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(0,i.$)(r.type+(e?"<"+e+">":""))+")"})}return d;function d(){let i,h,d,p=o;if((!t||c(r,u,f[f.length-1]||void 0))&&(p=function(e){return Array.isArray(e)?e:"number"==typeof e?[!0,e]:null==e?o:[e]}(n(r,f)))[0]===a)return p;if("children"in r&&r.children&&r.children&&"skip"!==p[0])for(h=(s?r.children.length:-1)+l,d=f.concat(r);h>-1&&h