12 lines
98 KiB
Plaintext
12 lines
98 KiB
Plaintext
/*! For license information please see 78954.8985ac2b.js.LICENSE.txt */
|
|
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?e():"function"==typeof define&&define.amd?define([],e):(t="undefined"!=typeof globalThis?globalThis:t||self)&&e()}(this,function(){"use strict";"object"==typeof window&&(window.openRedirect={version:"1.2.20",webpackPluginVersion:"3.4.22",reportOnly:!1})}),!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).xss={})}(this,function(t){"use strict";var e=function(){return(e=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}).apply(this,arguments)};function i(t,e,i){if(i||2==arguments.length)for(var r,n=0,s=e.length;n<s;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))}var r=/[^a-zA-Z0-9\\_:.-]/gim,n=/</g,s=/>/g,a=/&#([a-zA-Z0-9]*);?/gim,o=/"/g,l=/:?/gim,h=/&newline;?/gim,c=/((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,u=/u\s*r\s*l\s*\(.*/gi,d=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,f=/"/g,p=function(t){return t.replace(n,"<").replace(s,">")},g={indexOf:function(t,e){var i,r;for(i=0,r=t.length;i<r;i++)if(t[i]===e)return i;return -1},forEach:function(t,e,i){var r,n;for(r=0,n=t.length;r<n;r++)e.call(i,t[r],r,t)},some:function(t,e,i){var r,n;for(r=0,n=t.length;r<n;r++)if(e.call(i,t[r],r,t))return!0;return!1},trim:function(t){return t.replace(/(^\s*)|(\s*$)/g,"")},includes:function(t,e){if("string"==typeof t)return -1!==t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return!0;return!1},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1},uniq:function(t){for(var e={},i=[],r=0;r<t.length;r++)e[t[r]]||(i.push(t[r]),e[t[r]]=!0);return i},from:function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i]);return e},keys:function(t){var e=[];for(var i in t)e.push(i);return e}};function m(t){return null==t}function _(t){var e;return'"'===(e=t)[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]?t.substr(1,t.length-2):t}function v(t){var e,i,r,n,s,a,o,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h="",c=0;for(t=function(t){t=t.replace(/rn/g,"n");for(var e="",i=0;i<t.length;i++){var r=t.charCodeAt(i);r<128?e+=String.fromCharCode(r):r>127&&r<2048?e+=String.fromCharCode(r>>6|192)+String.fromCharCode(63&r|128):e+=String.fromCharCode(r>>12|224)+String.fromCharCode(r>>6&63|128)+String.fromCharCode(63&r|128)}return e}(t);c<t.length;)n=(e=t.charCodeAt(c++))>>2,s=(3&e)<<4|(i=t.charCodeAt(c++))>>4,a=(15&i)<<2|(r=t.charCodeAt(c++))>>6,o=63&r,isNaN(i)?a=o=64:isNaN(r)&&(o=64),h=h+l.charAt(n)+l.charAt(s)+l.charAt(a)+l.charAt(o);return h}function y(t){var e,i,r,n,s,a,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l="",h=0;for(t=t.replace(/[^A-Za-z0-9+/=]/g,"");h<t.length;)e=o.indexOf(t.charAt(h++))<<2|(n=o.indexOf(t.charAt(h++)))>>4,i=(15&n)<<4|(s=o.indexOf(t.charAt(h++)))>>2,r=(3&s)<<6|(a=o.indexOf(t.charAt(h++))),l+=String.fromCharCode(e),64!==s&&(l+=String.fromCharCode(i)),64!==a&&(l+=String.fromCharCode(r));return function(t){for(var e="",i=0,r=0,n=0,s=0;i<t.length;)(r=t.charCodeAt(i))<128?(e+=String.fromCharCode(r),i++):r>191&&r<224?(e+=String.fromCharCode((31&r)<<6|63&(s=t.charCodeAt(i+1))),i+=2):(s=t.charCodeAt(i+1),e+=String.fromCharCode((15&r)<<12|(63&s)<<6|63&(n=t.charCodeAt(i+2))),i+=3);return e}(l)}function S(t,e,i){var r="",n=0,s=!1,a=!1,o=0,l=t.length,h="",c="";t:for(o=0;o<l;o++){var u=t.charAt(o);if(!1===s){if("<"===u){s=o;continue}}else if(!1===a){if("<"===u){r+=i(t.slice(n,o)),s=o,n=o;continue}if(">"===u||o===l-1){r+=i(t.slice(n,s)),h=function(t){var e,i=g.spaceIndex(t);return e=-1===i?t.slice(1,-1):t.slice(1,i+1),"/"===(e=g.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}(c=t.slice(s,o+1)),r+=e(s,r.length,h,c,"</"===c.slice(0,2)),n=o+1,s=!1;continue}if('"'===u||"'"===u)for(var d=1,f=t.charAt(o-d);""===f.trim()||"="===f;){if("="===f){a=u;continue t}f=t.charAt(o-++d)}}else if(u===a){a=!1;continue}}return n<l&&(r+=i(t.substr(n))),r}function b(t,e){var i=0,n=0,s=[],a=!1,o=t.length;function l(t,i){if(!((t=(t=g.trim(t)).replace(r,"").toLowerCase()).length<1)){var n=e(t,i||"");n&&s.push(n)}}for(var h=0;h<o;h++){var c=t.charAt(h),u=void 0;if(!1!==a||"="!==c){if(!1===a||h!==n){if(/\s|\n|\t/.test(c)){if(t=t.replace(/\s|\n|\t/g," "),!1===a){if(-1===(u=function(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"="===i?e:-1}return -1}(t,h))){l(g.trim(t.slice(i,h))),a=!1,i=h+1;continue}h=u-1;continue}if(-1===(u=function(t,e){for(;e>0;e--){var i=t[e];if(" "!==i)return"="===i?e:-1}return -1}(t,h-1))){l(a,_(g.trim(t.slice(i,h)))),a=!1,i=h+1;continue}}}else{if(-1===(u=t.indexOf(c,h+1)))break;l(a,g.trim(t.slice(n+1,u))),a=!1,i=(h=u)+1}}else a=t.slice(i,h),i=h+1,n='"'===t.charAt(i)||"'"===t.charAt(i)?i:function(t,e){for(;e<t.length;e++){var i=t[e];if(" "!==i)return"'"===i||'"'===i?e:-1}return -1}(t,h+1)}return i<t.length&&(!1===a?l(t.slice(i)):l(a,_(g.trim(t.slice(i))))),g.trim(s.join(" "))}function E(t,e,i){if(i=function(t){return t=function(t){for(var e="",i=0,r=t.length;i<r;i++)e+=32>t.charCodeAt(i)?" ":t.charAt(i);return g.trim(e)}(t=(t=(t=t.replace(o,'"')).replace(a,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})).replace(l,":").replace(h," "))}(i),"href"===e||"src"===e){if("#"===(i=g.trim(i)))return"#";if("http://"!==i.substr(0,7)&&"https://"!==i.substr(0,8)&&"mailto:"!==i.substr(0,7)&&"tel:"!==i.substr(0,4)&&"data:image/"!==i.substr(0,11)&&"ftp://"!==i.substr(0,6)&&"./"!==i.substr(0,2)&&"../"!==i.substr(0,3)&&"#"!==i[0]&&"/"!==i[0])return""}else if("background"===e){if(c.lastIndex=0,c.test(i))return""}else if("style"===e&&(d.lastIndex=0,d.test(i)||(u.lastIndex=0,u.test(i)&&(c.lastIndex=0,c.test(i)))))return"";return i=function(t){return t=p(t=t.replace(f,"""))}(i)}var w=function(t){return"string"==typeof t?t.replace(/'/g,'"').replace('=""',"").replace(/\s+/g,"").toLowerCase():""},T=function(){function t(t){var e=function(t){var e={};for(var i in t)e[i]=t[i];return e}(t||{});e.stripIgnoreTag&&(e.onIgnoreTag,e.onIgnoreTag=function(){return""}),e.whiteList={},e.onTag=function(){},e.onTagAttr=function(){},e.onIgnoreTag=function(){},e.onIgnoreTagAttr=function(){},e.safeAttrValue=E,e.escapeHtml=p,this.options=Object.assign(e,t)}return t.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e,i,r,n,s,a,o=this.options,l=o.whiteList,h=o.onTag,c=o.onIgnoreTag,u=o.onTagAttr,d=o.onIgnoreTagAttr,f=o.safeAttrValue,p=o.escapeHtml;o.stripBlankChar&&(t=(e=(e=t.split("")).filter(function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)})).join("")),o.allowCommentTag||(t=function(t){for(var e="",i=0;i<t.length;){var r=t.indexOf("\x3c!--",i);if(-1===r){e+=t.slice(i);break}e+=t.slice(i,r);var n=t.indexOf("--\x3e",r);if(-1===n)break;i=n+3}return e}(t));var m=!1;o.stripIgnoreTagBody&&(i=o.stripIgnoreTagBody,"function"!=typeof(r=c)&&(r=function(){}),n=!Array.isArray(i),s=[],a=!1,c=(m={onIgnoreTag:function(t,e,o){var l;if(l=t,n||-1!==g.indexOf(i,l)){if(o.isClosing){var h="[/removed]",c=o.position+h.length;return s.push([!1!==a?a:o.position,c]),a=!1,h}return a||(a=o.position),"[removed]"}return r(t,e,o)},remove:function(t){var e="",i=0;return g.forEach(s,function(r){e+=t.slice(i,r[0]),i=r[1]}),e+=t.slice(i)}}).onIgnoreTag);var _=S(t,function(t,e,i,r,n){var s={sourcePosition:t,position:e,isClosing:n,isWhite:Object.prototype.hasOwnProperty.call(l,i)},a=h(i,r,s);if(null!=a)return a;if(s.isWhite){if(s.isClosing)return"</".concat(i,">");var o=function(t){var e=g.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var i="/"===(t=g.trim(t.slice(e+1,-1)))[t.length-1];return i&&(t=g.trim(t.slice(0,-1))),{html:t,closing:i}}(r),m=l[i],_=b(o.html,function(t,e){var r=-1!==g.indexOf(m,t),n=u(i,t,e,r);return null==n?r?(e=f(i,t,e,null))?"".concat(t,'="').concat(e,'"'):t:null==(n=d(i,t,e,r))?void 0:n:n});return r="<".concat(i),_&&(r+=" ".concat(_)),o.closing&&(r+=" /"),r+=">"}return null==(a=c(i,r,s))?p(r):a},p);return m&&(_=m.remove(_)),_},t}(),k=Function("\nvar _checkXSS = function (it) {\n return it && it.Math == Math && it;\n};\nreturn _checkXSS(typeof globalThis === 'object' && globalThis) ||\n_checkXSS(typeof window === 'object' && window) ||\n_checkXSS(typeof self === 'object' && self) ||\n_checkXSS(typeof global === 'object' && global) ||\nFunction('return this')();\n")(),x=new(function(){function t(){var t=this;this.batchData=[],this.uniqKeys=new Set,this.timeout=2e3,this.lock=!1,this.getSlardarBid=function(){var e,i,r="douyin_web";if(!g.includes(r,"bid"))return r;if(t.config&&t.config.bid)return t.config.bid;if(k&&k._xssBid)return k._xssBid;if(k&&k.slardar&&"function"==typeof k.slardar.config){var n=(k.slardar.config()||{}).bid;if(n)return n}if(k&&k.Slardar&&"function"==typeof k.Slardar.config){var s=(k.Slardar.config()||{}).bid;if(s)return s}return(null===(i=null===(e=null==k?void 0:k.Slardar)||void 0===e?void 0:e._baseParams)||void 0===i?void 0:i.bid)||"argus"},this.getConfigRegion=function(){var e;return g.includes("cn","region")?t.config&&t.config.region?t.config.region:((null===(e=null==k?void 0:k.gfdatav1)||void 0===e?void 0:e.region)||"cn").toLowerCase():"cn"},this.gerReportUrl=function(){var e={cn:y("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boe:y("aHR0cHM6Ly9tb24uemlqaWVhcGkuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),ttp:y("aHR0cHM6Ly9tb24udXMudGlrdG9rdi5jb20vbW9uaXRvcl9icm93c2VyL2NvbGxlY3QvYmF0Y2gvc2VjdXJpdHkvP2JpZD0="),va:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),maliva:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),sg:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9"),boei18n:y("aHR0cHM6Ly9tb24tdmEuYnl0ZW92ZXJzZWEuY29tL21vbml0b3JfYnJvd3Nlci9jb2xsZWN0L2JhdGNoL3NlY3VyaXR5Lz9iaWQ9")}[t.getConfigRegion()];if(e)return e+t.getSlardarBid()}}return t.prototype.setConfig=function(t){this.config=t},t.prototype.upload=function(){var t=this,e=this.gerReportUrl();!this.lock&&e&&0!==this.batchData.length&&(this.lock=!0,setTimeout(function(){var i=t.batchData.slice(0,100);t.batchData=t.batchData.slice(100),k.fetch(e,{method:"post",body:JSON.stringify(i),headers:{"Content-Type":"application/json"}}).catch(function(t){}),t.lock=!1,t.upload()},this.timeout))},t.prototype.generateKey=function(t){return t.collectKey?[t.collectMode,t.collectKey].join("___"):""},t.prototype.push=function(t){this.batchData.push(t),this.upload()},t.prototype.report=function(t){var e=this.generateKey(t);if(k.fetch&&t.collectKey){var i="object"==typeof window?window.location.href:"SSR";t.documentUrl=i;var r={age:Math.floor(Date.now()),type:"xss",url:i,body:t,"user-agent":""};"enforce"===t.disposition&&"SSR"!==i||(r.url=e),"SSR"===i&&(r.url="SSR___".concat(r.url),r.body.ssr=!0),this.push(r)}},t}()),L=function(t){for(var e=0,i=function(i){Array.isArray(t[i])?0===t[i].length?delete t[i]:(t[i]=g.from(g.uniq(t[i])),e+=t[i].length):0===g.keys(t[i]).length?delete t[i]:g.keys(t[i]).forEach(function(r){t[i][r]=g.from(g.uniq(t[i][r])),e+=t[i][r].length})},r=0,n=g.keys(t);r<n.length;r++)i(n[r]);return{count:e,ret:t}};function A(t,e){return x.setConfig(e),new T(e).process(t)}function C(t){var e,i=(e=/\s|\n|\t/.exec(t))?e.index:-1;if(-1===i)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=t.slice(i+1,-1).trim())[t.length-1];return r&&(t=t.slice(0,-1).trim()),{html:t,closing:r}}var P=function(t){return -1===(t=(t=(t=(t=t.replace(/:/gi,":")).replace(/&tab;/gi,"")).replace(/&newline;/gi,"")).replace(/(\t|\n|\r)/g,"")).indexOf("&#")?t.trim().toLowerCase():t.trim().replace(/&#(?:(x)([0-9a-f]+)|([0-9]+));?/gi,function(t,e,i,r){return String.fromCharCode(e?parseInt(i,16):parseInt(r))}).replace(/(\t|\n|\r)/g,"").toLowerCase()};function O(t,e){if(void 0===t&&(t=""),"string"!=typeof t)return!0;if(t=P(t),g.includes(t,"base64")&&!function(t){if(""===t||""===t.trim())return!0;try{return!g.includes(t,"data:text/html;base64")}catch(t){return!0}}(t))return e&&e("data:text/html;base64"),!1;var i=["expression(","behavior:","view-source:"];if(g.some(i,function(e){return -1!==t.indexOf(e)}))return g.forEach(i,function(i){-1!==t.indexOf(i)&&e&&e(i)}),!1;var r=["data:application","data:javascript","data:text/html","data:texthtml"];if(g.some(r,function(e){return -1!==t.indexOf(e)}))return g.forEach(r,function(i){-1!==t.indexOf(i)&&e&&e(i)}),!1;if(t.indexOf("javascript:")>0)return e&&e("javascript:"),!1;if(/^javascript:/i.test(t)){var n=t.slice(11).replace(/\s/g,"").trim();return!!g.some(["void","void(0)","void0","false","undefined",";"],function(t){return t===n})||(e&&e("javascript:"),!1)}return!0}var R=function(t,e){var i,r,n="<%= isSaveValidUrl =>";if("string"!=typeof t||(r=Number("<%= urlLimit =>"),void 0!==i&&(r=i),"NaN"!==t.toString()&&-1!==r&&t.length>=r)||O(t,e))return t;try{if(!0===(n=JSON.parse(n))||"true"===n){var s=new URL(t);return s.origin+s.pathname}}catch(t){}return"#"};function M(t,e,r){if(void 0===t&&(t=""),void 0===e&&(e=[]),"string"!=typeof t)return!0;if(!O(t=P(t)))return!1;var n,s={url:(n=t.match(/^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/)||[])[0],scheme:n[1],slash:n[2],host:n[3],port:n[4],path:n[5],query:n[6],hash:n[7]},a=s.scheme,o=s.host;return r?!!r(t):!(!a||!o)&&(!g.includes(["http","https","file"],a)||("object"==typeof window&&window&&(e=i(i([],e,!0),[location.host],!1)),g.some(e,function(t){return!!(t instanceof RegExp&&t.test(o))||t===o})))}var N={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:[]},I={collect:null,initCollect:function(){this.collect={whiteList:{},filterProtocol:[]}},removeCollect:function(){var t=L(this.collect),e=t.count,i=t.ret;return this.collect=null,{collectKey:0===e?null:JSON.stringify(i),collectMode:"white"}},onIgnoreTagAttr:function(t,e,r){return t&&g.indexOf(["href","src"],e)>-1?I.domainWhiteList&&Array.isArray(I.domainWhiteList)&&I.domainWhiteList.length>0&&!M(r,i([],I.domainWhiteList,!0))?"":"".concat(e,'="').concat(R(r,function(t){var e;null===(e=I.collect)||void 0===e||e.filterProtocol.push(t)}),'"'):t&&(g.indexOf(["style","class","id"],e)>-1||e.indexOf("data-")>-1)?"".concat(e,'="').concat(r,'"'):(I.collect.whiteList[t]=I.collect.whiteList[t]||[],void I.collect.whiteList[t].push(e))},onIgnoreTag:function(t,e){if("style"===t)return e;S(e,function(t,e,i,r){b(C(r).html.replace("/",""),function(t){I.collect.whiteList[i]=I.collect.whiteList[i]||[],I.collect.whiteList[i].push(t)})},p)},whiteList:N,mergeWhiteList:function(t){for(var e,i={},r=0,n=g.keys(N);r<n.length;r++)i[e=n[r]]=g.from(N[e]);for(var s=0,a=g.keys(t);s<a.length;s++)i[e=a[s]]=e in N?N[e].concat(t[e]):g.from(t[e]);return i},setWhiteList:function(t){for(var e=0,i=g.keys(t);e<i.length;e++){var r=i[e];this.whiteList[r]=r in N?N[r].concat(t[r]):g.from(t[r])}}};try{var j={},D="merge";g.includes(D,"override")&&(I.whiteList=j.whiteList),g.includes(D,"merge")&&I.setWhiteList(j.whiteList)}catch(t){}var V=function(t,e){for(var i={},r=0,n=g.keys(t);r<n.length;r++){var s=n[r];Array.isArray(t[s])?i[s]=g.from(t[s]):i[s]=V({},t[s])}for(var a=0,o=g.keys(e);a<o.length;a++)(s=o[a])in t?Array.isArray(t[s])?i[s]=t[s].concat(e[s]):i[s]=V(t[s],e[s]):Array.isArray(e[s])?i[s]=g.from(e[s]):i[s]=V({},e[s]);return i},W={blackList:{a:["folder"],meta:["content"],iframe:["srcdoc"],input:["pattern"],vmlframe:["xmlns"]},blackTags:["script","xml","embed","isindex","object","base","set","handler","animate","payload","import"],blackAttrs:["charset","ns","namespace","formaction","xlink:href","xmlns:xlink","handler","repeat","repeat-start","repeat-end"],blackAttrRegExps:[/^on/],filterList:{param:["value"],video:["poster"],form:["action"]},filterAttrs:["href","src","background","style","dynsrc","lowsrc","content"]};try{var Z={};Z.blackAttrRegExps&&(Z.blackAttrRegExps=Z.blackAttrRegExps.map(function(t){return new RegExp(t.toString().slice(1,t.toString().length-1))}));var U="merge";g.includes(U,"override")&&(W=Z),g.includes(U,"merge")&&(W=V(W,Z))}catch(t){}var F={mode:"black",whiteList:{},blackConfig:W,collect:null,initCollect:function(){F.collect={blackList:{},blackTags:[],blackAttrs:[],blackAttrRegExps:[],filterAttrs:[],filterList:{},filterProtocol:[]}},removeCollect:function(){var t=L(F.collect),e=t.count,i=t.ret;return F.collect=null,{collectKey:0===e?null:JSON.stringify(i),collectMode:"black"}},onIgnoreTag:function(t,e){var i;if(!g.includes(W.blackTags,t))return S(e,function(t,e,i,r,n){if(-1!==i.indexOf("/"))return p(r);if(n)return"</".concat(i,">");var s=C(r),a=b(s.html,function(t,e){var r,n=0;if(W.blackList[i]&&g.includes(W.blackList[i],t)&&(F.collect.blackList[i]=F.collect.blackList[i]||[],F.collect.blackList[i].push(t),n++),W.blackAttrRegExps.length&&W.blackAttrRegExps.some(function(e){return e.test(t)})&&g.forEach(W.blackAttrRegExps,function(e){e.test(t)&&(F.collect.blackAttrRegExps.push("".concat(e.toString(),"->").concat(t)),n++)}),W.blackAttrs.length&&g.includes(W.blackAttrs,t)&&(W.blackAttrs.push(t),n++),!n){if(W.filterList&&W.filterList[i]&&g.includes(W.filterList[i],t)){var s=R(e,function(t){var e;null===(e=F.collect)||void 0===e||e.filterProtocol.push(t)});return s!==e&&(F.collect.filterList[i]=F.collect.filterList[i]||[],F.collect.filterList[i].push(t)),e?"".concat(t,"='").concat(s,"'"):t}return W.filterAttrs&&g.includes(W.filterAttrs,t)?((s=R(e,function(t){var e;null===(e=F.collect)||void 0===e||e.filterProtocol.push(t)}))!==e&&(null===(r=F.collect)||void 0===r||r.filterAttrs.push(t)),e?"".concat(t,"='").concat(s,"'"):t):e?"".concat(t,"='").concat(e,"'"):t}});return r="<".concat(i),a&&(r+=" ".concat(a)),s.closing&&(r+=" /"),r+=">"},p);null===(i=F.collect)||void 0===i||i.blackTags.push(t)}},B=function(t){var e=t.reportOnly,i=void 0===e||e,r=t.block;return i&&"all"===i?"report":("string"==typeof i&&("true"===i&&(i=!0),"false"===i&&(i=!1)),r?"enforce":i?"report":"enforce")},H=function(t){return function(i,r,n){if(!i||"string"!=typeof i)return i;var s=r;t===A&&(s=I).initCollect();var a=t(i,s);if(w(a)===w(i))return i;if(!n)return a;var o=n.logType,l=B(n),h=s.removeCollect();return x.report(e(e({type:o,disposition:l},h),{sourceText:v(i),filterText:v(a)})),"enforce"===l?a:i}},G=H(function(t,e){return void 0===e&&(e={}),e&&e.whiteList||(e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}),new T(e).process(t)}),$=H(A),J=function(t,e,i){var r=[],n=R(t,function(t){r.push(t)});if(n===t)return t;r=g.from(g.uniq(r));var s=e||i||{};if(!s)return n;var a=s.logType,o=B(i);return x.report({type:a,disposition:o,collectKey:r.join("___"),collectData:JSON.stringify(r),collectMode:"black",sourceText:v(t),filterText:v(n)}),"enforce"===o?n:t},X=k._xssProject||{},Y=k.xssNamespace||{},K="3.0.26",z={FilterXSS:T,version:K,webpackPluginVersion:"<%= webpackPluginVersion =>",reportOnly:"<%= reportOnly =>",filterXSS:G,_filterXSS:$,filterUrl:J,Config:I,BlackConfig:F,project:X,setProjectName:function(t){X[t]=this,k._xssProjectName=t}};Y.douyin_web=z,k.xssNamespace=Y,k.Math&&!k.Math.xssNamespace&&(k.Math.xssNamespace=Y),X[K]=z,k.globalThis=k,k.getFilterXss=function(){return void 0!==this._xssProjectName?this._xssProject[this._xssProjectName]:z},k.xss=z,k.isSafeUrl=M,k.isSafeDomain=M,k.isSafeProtocol=O,k._xssProject=X,k._xssProjectName&&(X[k._xssProjectName]=z);var q=z.setProjectName.bind(z);t.BlackConfig=F,t.Config=I,t.FilterXSS=T,t._filterXSS=$,t.filterUrl=J,t.filterXSS=G,t.isSafeDomain=M,t.isSafeProtocol=O,t.isSafeUrl=M,t.project=X,t.setProjectName=q,t.setXssNamespace=function(t){var e=t.appId,i=t.bid,r=t.region;Y[e]=z;I.bid=i,I.region=r,I.enabled=!0},t.xssNamespace=Y,Object.defineProperty(t,"__esModule",{value:!0})}),(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["78954"],{697752:function(t,e,i){"use strict";var r=i(101199),n=i(994298);let s=(0,n.A)(function(t){return r.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},t),r.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 12c0 .83-.67 1.5-1.5 1.5H6.12l6.44 6.44a1.5 1.5 0 0 1-2.12 2.12l-9-9a1.5 1.5 0 0 1 0-2.12l9-9a1.5 1.5 0 0 1 2.12 2.12L6.12 10.5H21.5c.83 0 1.5.67 1.5 1.5Z",fill:"currentColor"}))},"arrow_left");e.Z=s},308980:function(t,e,i){var r,n,s;r=0,n=function(t){var e,i,r,n,s,a;return i=(e=t.lib).Base,r=e.WordArray,s=(n=t.algo).MD5,a=n.EvpKDF=i.extend({cfg:i.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var i,n=this.cfg,s=n.hasher.create(),a=r.create(),o=a.words,l=n.keySize,h=n.iterations;o.length<l;){i&&s.update(i),i=s.update(t).finalize(e),s.reset();for(var c=1;c<h;c++)i=s.finalize(i),s.reset();a.concat(i)}return a.sigBytes=4*l,a}}),t.EvpKDF=function(t,e,i){return a.create(i).compute(t,e)},t.EvpKDF},t.exports=n(i(776340),i(924447),i(892563))},320760:function(t,e,i){"use strict";i.d(e,{Z:function(){return s}});var r=i(634771),n=i(144256);function s(t){return(0,n.Z)(1,arguments),t instanceof Date||"object"===(0,r.Z)(t)&&"[object Date]"===Object.prototype.toString.call(t)}},807033:function(t){var e,i;e=0,i=function(){return function(t,e,i){e.prototype.isTomorrow=function(){var t="YYYY-MM-DD",e=i().add(1,"day");return this.format(t)===e.format(t)}}},t.exports=i()},737877:function(t,e,i){var r=i(870127),n=t.exports;!function(){"use strict";var t,e,i,s=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(t){return s.lastIndex=0,s.test(t)?'"'+t.replace(s,function(t){var e=a[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}"function"!=typeof n.stringify&&(n.stringify=function(n,s,a){var l;if(t="",e="","number"==typeof a)for(l=0;l<a;l+=1)e+=" ";else"string"==typeof a&&(e=a);if(i=s,s&&"function"!=typeof s&&("object"!=typeof s||"number"!=typeof s.length))throw Error("JSON.stringify");return function n(s,a){var l,h,c,u,d,f=t,p=a[s],g=null!=p&&(p instanceof r||r.isBigNumber(p));switch(p&&"object"==typeof p&&"function"==typeof p.toJSON&&(p=p.toJSON(s)),"function"==typeof i&&(p=i.call(a,s,p)),typeof p){case"string":if(g)return p;return o(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":case"bigint":return String(p);case"object":if(!p)return"null";if(t+=e,d=[],"[object Array]"===Object.prototype.toString.apply(p)){for(l=0,u=p.length;l<u;l+=1)d[l]=n(l,p)||"null";return c=0===d.length?"[]":t?"[\n"+t+d.join(",\n"+t)+"\n"+f+"]":"["+d.join(",")+"]",t=f,c}if(i&&"object"==typeof i)for(l=0,u=i.length;l<u;l+=1)"string"==typeof i[l]&&(c=n(h=i[l],p))&&d.push(o(h)+(t?": ":":")+c);else Object.keys(p).forEach(function(e){var i=n(e,p);i&&d.push(o(e)+(t?": ":":")+i)});return c=0===d.length?"{}":t?"{\n"+t+d.join(",\n"+t)+"\n"+f+"}":"{"+d.join(",")+"}",t=f,c}}("",{"":n})})}()},37933:function(t){var e,i,r=Object.prototype.toString,n=Math.max;var s=(e=function(t){if(!(t&&t.length))return[];var e=0;return t=function(t,e){for(var i=-1,r=t?t.length:0,n=0,s=[];++i<r;){var a=t[i];e(a,i,t)&&(s[n++]=a)}return s}(t,function(t){if(function(t){var e;return function(t){return!!t&&"object"==typeof t}(t)&&null!=(e=t)&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(e.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?r.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(e)}(t))return e=n(t.length,e),!0}),function(t,e){for(var i=-1,r=Array(t);++i<t;)r[i]=e(i);return r}(e,function(e){var i;return function(t,e){for(var i=-1,r=t?t.length:0,n=Array(r);++i<r;)n[i]=e(t[i],i,t);return n}(t,(i=e,function(t){return null==t?void 0:t[i]}))})},i=n(void 0===i?e.length-1:i,0),function(){for(var t=arguments,r=-1,s=n(t.length-i,0),a=Array(s);++r<s;)a[r]=t[i+r];r=-1;for(var o=Array(i+1);++r<i;)o[r]=t[r];return o[i]=a,function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}(e,this,o)});t.exports=s},815527:function(t,e,i){var r=i(557012),n=i(325146),s=i(993902),a=i(821154),o=i(757825),l=i(728377);t.exports=function(t,e,i,h){var c=-1,u=n,d=!0,f=t.length,p=[],g=e.length;if(!f)return p;i&&(e=a(e,o(i))),h?(u=s,d=!1):e.length>=200&&(u=l,d=!1,e=new r(e));e:for(;++c<f;){var m=t[c],_=null==i?m:i(m);if(m=h||0!==m?m:0,d&&_==_){for(var v=g;v--;)if(e[v]===_)continue e;p.push(m)}else!u(e,_,h)&&p.push(m)}return p}},399257:function(t,e,i){var r=i(368529);t.exports=function(t){return"function"==typeof t?t:r}},662303:function(t,e,i){var r=i(294089),n=i(224595),s=i(48946),a=i(743721),o=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,s(t)),t=n(t);return e}:a;t.exports=o},5784:function(t,e,i){var r=i(543860);t.exports=function(t,e,i){return null==t?t:r(t,e,i)}},737819:function(t,e,i){"use strict";i.d(e,{Qs:function(){return d},ZP:function(){return u},bR:function(){return h},g2:function(){return c},rl:function(){return f},v8:function(){return l},xn:function(){return a},z3:function(){return s}});function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i<e;i++)r[i]=t[i];return r}function n(t,e,i){for(var r=arguments.length,n=Array(r>3?r-3:0),s=3;s<r;s++)n[s-3]=arguments[s];var a=e.call.apply(e,[t].concat(n));if(!!i&&"function"==typeof i)a&&a.then?a.then(function(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];i.call.apply(i,[t].concat(r))}):i.call.apply(i,[t].concat(n))}function s(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{pre:null,next:null};return!this.__hooks&&(this.__hooks={}),this.__hooks[t]||(this.__hooks[t]=null),(function(){var s=arguments,a=this;if(i.pre)try{(o=i.pre).call.apply(o,[this].concat(Array.prototype.slice.call(arguments)))}catch(e){throw e.message="[pluginName: ".concat(this.pluginName,":").concat(t,":pre error] >> ").concat(e.message),e}if(this.__hooks&&this.__hooks[t])try{var o,l,h=(l=this.__hooks[t]).call.apply(l,[this,this].concat(Array.prototype.slice.call(arguments)));h?h.then?h.then(function(t){if(!1!==t){var o;n.apply(void 0,[a,e,i.next].concat((o=s,function(t){if(Array.isArray(t))return r(t)}(o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);if("Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return r(t,e)}}(o)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())))}}).catch(function(t){throw t}):n.apply(void 0,[this,e,i.next].concat(Array.prototype.slice.call(arguments))):void 0===h&&n.apply(void 0,[this,e,i.next].concat(Array.prototype.slice.call(arguments)))}catch(e){throw e.message="[pluginName: ".concat(this.pluginName,":").concat(t,"] >> ").concat(e.message),e}else n.apply(void 0,[this,e,i.next].concat(Array.prototype.slice.call(arguments)))}).bind(this)}function a(t,e){var i=this.__hooks;return i?!!i.hasOwnProperty(t)&&(i&&(i[t]=e),!0):void 0}function o(t,e){var i=this.__hooks;if(!i||!Array.isArray(i[t]))return -1;for(var r=i[t],n=0;n<r.length;n++)if(r[n]===e)return n;return -1}function l(t,e){var i=this.__hooks;if(!!i)if(Array.isArray(i[t])){var r=i[t],n=o.call(this,t,e);-1!==n&&r.splice(n,1)}else i[t]&&(i[t]=null)}function h(t){if(!!this.plugins&&!!this.plugins[t.toLowerCase()]){for(var e=this.plugins[t.toLowerCase()],i=arguments.length,r=Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return e.useHooks&&e.useHooks.apply(e,r)}}function c(t){if(!!this.plugins&&!!this.plugins[t.toLowerCase()]){var e=this.plugins[t.toLowerCase()];if(e){for(var i=arguments.length,r=Array(i>1?i-1:0),n=1;n<i;n++)r[n-1]=arguments[n];return e.removeHooks&&e.removeHooks.apply(e,r)}}}function u(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.__hooks={},e&&e.map(function(e){t.__hooks[e]=null}),Object.defineProperty(t,"hooks",{get:function(){return t.__hooks&&Object.keys(t.__hooks).map(function(e){if(t.__hooks[e])return e})}})}function d(t){t.__hooks=null}function f(t,e,i){for(var r=arguments.length,n=Array(r>3?r-3:0),s=3;s<r;s++)n[s-3]=arguments[s];if(!t.__hooks||!t.__hooks[e])return i.call.apply(i,[t,t].concat(n));var a,o=(a=t.__hooks[e]).call.apply(a,[t,t].concat(n));if(o&&o.then)o.then(function(e){return!1===e?null:i.call.apply(i,[t,t].concat(n))}).catch(function(t){});else if(!1!==o)return i.call.apply(i,[t,t].concat(n))}},955053:function(t,e,i){"use strict";i.r(e)},893933:function(t,e,i){"use strict";i.r(e)},635303:function(t,e,i){"use strict";i.r(e)},423562:function(t,e,i){"use strict";let r=i(953806),n=/^[\da-fA-F]+$/,s=/^\d+$/,a=new WeakMap;function o(t){t=t.Parser.acorn||t;let e=a.get(t);if(!e){let i=t.tokTypes,r=t.TokContext,n=t.TokenType,s=new r("<tag",!1),o=new r("</tag",!1),l=new r("<tag>...</tag>",!0,!0),h={jsxName:new n("jsxName"),jsxText:new n("jsxText",{beforeExpr:!0}),jsxTagStart:new n("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new n("jsxTagEnd")};h.jsxTagStart.updateContext=function(){this.context.push(l),this.context.push(s),this.exprAllowed=!1},h.jsxTagEnd.updateContext=function(t){let e=this.context.pop();e===s&&t===i.slash||e===o?(this.context.pop(),this.exprAllowed=this.curContext()===l):this.exprAllowed=!0},e={tokContexts:{tc_oTag:s,tc_cTag:o,tc_expr:l},tokTypes:h},a.set(t,e)}return e}function l(t){return t?"JSXIdentifier"===t.type?t.name:"JSXNamespacedName"===t.type?t.namespace.name+":"+t.name.name:"JSXMemberExpression"===t.type?l(t.object)+"."+l(t.property):void 0:t}t.exports=function(t){return t=t||{},function(e){return function(t,e){let a=e.acorn||i(114281),h=o(a),c=a.tokTypes,u=h.tokTypes,d=a.tokContexts,f=h.tokContexts.tc_oTag,p=h.tokContexts.tc_cTag,g=h.tokContexts.tc_expr,m=a.isNewLine,_=a.isIdentifierStart,v=a.isIdentifierChar;return class extends e{static get acornJsx(){return h}jsx_readToken(){let t="",e=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let i=this.input.charCodeAt(this.pos);switch(i){case 60:case 123:if(this.pos===this.start){if(60===i&&this.exprAllowed)return++this.pos,this.finishToken(u.jsxTagStart);return this.getTokenFromCode(i)}return t+=this.input.slice(e,this.pos),this.finishToken(u.jsxText,t);case 38:t+=this.input.slice(e,this.pos)+this.jsx_readEntity(),e=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===i?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:m(i)?(t+=this.input.slice(e,this.pos)+this.jsx_readNewLine(!0),e=this.pos):++this.pos}}}jsx_readNewLine(t){let e,i=this.input.charCodeAt(this.pos);return++this.pos,13===i&&10===this.input.charCodeAt(this.pos)?(++this.pos,e=t?"\n":"\r\n"):e=String.fromCharCode(i),this.options.locations&&(++this.curLine,this.lineStart=this.pos),e}jsx_readString(t){let e="",i=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let r=this.input.charCodeAt(this.pos);if(r===t)break;38===r?(e+=this.input.slice(i,this.pos)+this.jsx_readEntity(),i=this.pos):m(r)?(e+=this.input.slice(i,this.pos)+this.jsx_readNewLine(!1),i=this.pos):++this.pos}return e+=this.input.slice(i,this.pos++),this.finishToken(c.string,e)}jsx_readEntity(){let t="",e=0,i,a=this.input[this.pos];"&"!==a&&this.raise(this.pos,"Entity must start with an ampersand");let o=++this.pos;for(;this.pos<this.input.length&&e++<10;){if(";"===(a=this.input[this.pos++])){"#"===t[0]?"x"===t[1]?(t=t.substr(2),n.test(t)&&(i=String.fromCharCode(parseInt(t,16)))):(t=t.substr(1),s.test(t)&&(i=String.fromCharCode(parseInt(t,10)))):i=r[t];break}t+=a}return i?i:(this.pos=o,"&")}jsx_readWord(){let t,e=this.pos;do t=this.input.charCodeAt(++this.pos);while(v(t)||45===t);return this.finishToken(u.jsxName,this.input.slice(e,this.pos))}jsx_parseIdentifier(){let t=this.startNode();return this.type===u.jsxName?t.name=this.value:this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsx_parseNamespacedName(){let e=this.start,i=this.startLoc,r=this.jsx_parseIdentifier();if(!t.allowNamespaces||!this.eat(c.colon))return r;var n=this.startNodeAt(e,i);return n.namespace=r,n.name=this.jsx_parseIdentifier(),this.finishNode(n,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===u.jsxTagEnd)return"";let e=this.start,i=this.startLoc,r=this.jsx_parseNamespacedName();for(this.type===c.dot&&"JSXNamespacedName"===r.type&&!t.allowNamespacedObjects&&this.unexpected();this.eat(c.dot);){let t=this.startNodeAt(e,i);t.object=r,t.property=this.jsx_parseIdentifier(),r=this.finishNode(t,"JSXMemberExpression")}return r}jsx_parseAttributeValue(){switch(this.type){case c.braceL:let t=this.jsx_parseExpressionContainer();return"JSXEmptyExpression"===t.expression.type&&this.raise(t.start,"JSX attributes must only be assigned a non-empty expression"),t;case u.jsxTagStart:case c.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let t=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let t=this.startNode();return this.next(),t.expression=this.type===c.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(c.braceR),this.finishNode(t,"JSXExpressionContainer")}jsx_parseAttribute(){let t=this.startNode();return this.eat(c.braceL)?(this.expect(c.ellipsis),t.argument=this.parseMaybeAssign(),this.expect(c.braceR),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsx_parseNamespacedName(),t.value=this.eat(c.eq)?this.jsx_parseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsx_parseOpeningElementAt(t,e){let i=this.startNodeAt(t,e);i.attributes=[];let r=this.jsx_parseElementName();for(r&&(i.name=r);this.type!==c.slash&&this.type!==u.jsxTagEnd;)i.attributes.push(this.jsx_parseAttribute());return i.selfClosing=this.eat(c.slash),this.expect(u.jsxTagEnd),this.finishNode(i,r?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(t,e){let i=this.startNodeAt(t,e),r=this.jsx_parseElementName();return r&&(i.name=r),this.expect(u.jsxTagEnd),this.finishNode(i,r?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(t,e){let i=this.startNodeAt(t,e),r=[],n=this.jsx_parseOpeningElementAt(t,e),s=null;if(!n.selfClosing){i:for(;;)switch(this.type){case u.jsxTagStart:if(t=this.start,e=this.startLoc,this.next(),this.eat(c.slash)){s=this.jsx_parseClosingElementAt(t,e);break i}r.push(this.jsx_parseElementAt(t,e));break;case u.jsxText:r.push(this.parseExprAtom());break;case c.braceL:r.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}l(s.name)!==l(n.name)&&this.raise(s.start,"Expected corresponding JSX closing tag for <"+l(n.name)+">")}let a=n.name?"Element":"Fragment";return i["opening"+a]=n,i["closing"+a]=s,i.children=r,this.type===c.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(i,"JSX"+a)}jsx_parseText(){let t=this.parseLiteral(this.value);return t.type="JSXText",t}jsx_parseElement(){let t=this.start,e=this.startLoc;return this.next(),this.jsx_parseElementAt(t,e)}parseExprAtom(t){return this.type===u.jsxText?this.jsx_parseText():this.type===u.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(t)}readToken(t){let e=this.curContext();if(e===g)return this.jsx_readToken();if(e===f||e===p){if(_(t))return this.jsx_readWord();if(62==t)return++this.pos,this.finishToken(u.jsxTagEnd);if((34===t||39===t)&&e==f)return this.jsx_readString(t)}return 60===t&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(u.jsxTagStart)):super.readToken(t)}updateContext(t){if(this.type==c.braceL){var e=this.curContext();e==f?this.context.push(d.b_expr):e==g?this.context.push(d.b_tmpl):super.updateContext(t),this.exprAllowed=!0}else{if(this.type!==c.slash||t!==u.jsxTagStart)return super.updateContext(t);this.context.length-=2,this.context.push(p),this.exprAllowed=!1}}}}({allowNamespaces:!1!==t.allowNamespaces,allowNamespacedObjects:!!t.allowNamespacedObjects},e)}},Object.defineProperty(t.exports,"tokTypes",{get:function(){return o(i(114281)).tokTypes},configurable:!0,enumerable:!0})},679895:function(t,e,i){"use strict";i(932651);var r=i(22186),n=i.n(r),s=i(101199),a=i(469935),o=i.n(a),l=i(622689),h=i.n(l),c=i(864793),u=i(209873),d=i(822772),f=i(505699),p=i(559748),g=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(t);n<r.length;n++)0>e.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]]);return i};class m extends s.PureComponent{onClick(t,e){var{value:i,label:r,children:n}=t,s=g(t,["value","label","children"]);let{props:a}=this;!a.disabled&&a.onSelect(Object.assign(Object.assign({},s),{value:i,label:r||n}),e)}renderOptionContent(t){let{config:e,children:i,inputValue:r,prefixCls:a}=t;return n()(i)&&r?s.createElement(f.Z,{searchWords:e.searchWords,sourceString:e.sourceString,highlightClassName:e.highlightClassName}):i}render(){let t=this.props,{children:e,disabled:i,value:r,selected:a,label:l,empty:h,emptyContent:c,onSelect:f,focused:m,showTick:_,className:v,style:y,onMouseEnter:S,prefixCls:b,renderOptionItem:E,inputValue:w,semiOptionId:T}=t,k=g(t,["children","disabled","value","selected","label","empty","emptyContent","onSelect","focused","showTick","className","style","onMouseEnter","prefixCls","renderOptionItem","inputValue","semiOptionId"]),x=o()(b,{[`${b}-disabled`]:i,[`${b}-selected`]:a,[`${b}-focused`]:m,[`${b}-empty`]:h,[v]:v}),L=o()([`${b}-icon`]);if(h)return null===c?null:s.createElement(u.Z,{componentName:"Select"},t=>s.createElement("div",{className:x,"x-semi-prop":"emptyContent"},c||t.emptyText));if("function"==typeof E){let t=o()(v,{[`${b}-custom`]:!0,[`${b}-custom-selected`]:a});return E(Object.assign({disabled:i,focused:m,selected:a,style:y,label:l,value:r,inputValue:w,onMouseEnter:t=>S(t),onClick:t=>this.onClick(Object.assign({value:r,label:l,children:e},k),t),className:t},k))}let A={searchWords:[w],sourceString:e,highlightClassName:`${b}-keyword`};return s.createElement("div",Object.assign({className:x,onClick:t=>{this.onClick(Object.assign({value:r,label:l,children:e},k),t)},onMouseEnter:t=>S&&S(t),role:"option",id:T,"aria-selected":a?"true":"false","aria-disabled":i?"true":"false",style:y},(0,p.Z)(k)),_?s.createElement("div",{className:L},s.createElement(d.Z,null)):null,n()(e)?s.createElement("div",{className:`${b}-text`},this.renderOptionContent({children:e,config:A,inputValue:w,prefixCls:b})):e)}}m.isSelectOption=!0,m.propTypes={children:h().node,disabled:h().bool,value:h().oneOfType([h().string,h().number]),selected:h().bool,label:h().node,empty:h().bool,emptyContent:h().node,onSelect:h().func,focused:h().bool,showTick:h().bool,className:h().string,style:h().object,onMouseEnter:h().func,prefixCls:h().string,renderOptionItem:h().func,inputValue:h().string},m.defaultProps={prefixCls:c.UX.PREFIX_OPTION},e.Z=m},328273:function(t,e,i){"use strict";var r=i(622689),n=i.n(r),s=i(278766);e.Z={align:n().oneOf(s.j2.ALIGNS),className:n().string,colSpan:n().number,dataIndex:n().string,defaultSortOrder:n().oneOf(s.j2.SORT_DIRECTIONS),filterChildrenRecord:n().bool,filterDropdownProps:n().object,filterDropdown:n().node,filterDropdownVisible:n().bool,filterIcon:n().func,filterMultiple:n().bool,filteredValue:n().arrayOf(n().any),filters:n().array,fixed:n().oneOf(s.j2.FIXED_SET),onCell:n().func,onFilter:n().func,onFilterDropdownVisibleChange:n().func,onHeaderCell:n().func,onSorterChange:n().func,render:n().func,renderFilterDropdownItem:n().func,sortChildrenRecord:n().bool,sortDirections:n().arrayOf(n().string),sortOrder:n().oneOfType([n().bool,n().string]),sorter:n().oneOfType([n().bool,n().func]),title:n().oneOfType([n().func,n().node]),useFullRender:n().bool,width:n().oneOfType([n().number,n().string]),showSortTip:n().bool}},705172:function(t,e,i){"use strict";i.d(e,{r:function(){return b}});var r=i(480333);i(679308),i(932651),i(490629);var n=i(141773),s=i(906331),a=i(445083),o=i(487359),l=i(822564),h=i(715784),c=i(306607),u=i(289982),d=i(843669),f=i(778108),p=i(500264),g=i(51180),m=i(799585),_=i(638582),v=i(970420),y=i(742744);let S=new o.ZP("hls");class b extends n.Z{get isLive(){var t;return null===(t=this._playlist)||void 0===t?void 0:t.isLive}get streams(){var t;return null===(t=this._playlist)||void 0===t?void 0:t.streams}get currentStream(){var t;return null===(t=this._playlist)||void 0===t?void 0:t.currentStream}get hasSubtitle(){var t;return null===(t=this._playlist)||void 0===t?void 0:t.hasSubtitle}get totalDuration(){var t;return null===(t=this._playlist)||void 0===t?void 0:t.totalDuration}get baseDts(){var t;return null===(t=this._bufferService)||void 0===t?void 0:t.baseDts}get abrSwitchPoint(){var t,e;let i=this._urlSwitching?null===(t=this._playlist)||void 0===t?void 0:t.currentSegment:null===(e=this._playlist)||void 0===e?void 0:e.nextSegment;return i?i.start+i.duration/2:null}speedInfo(){var t;return null===(t=this._segmentLoader)||void 0===t?void 0:t.speedInfo()}bufferInfo(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1;return s.l.info(s.l.get(this.media),null===(t=this.media)||void 0===t?void 0:t.currentTime,e)}async load(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i="boolean"==typeof e?e:!!(null==e?void 0:e.reuseMse);"object"==typeof e&&(null==e?void 0:e.clearSwitchStatus)&&(this._urlSwitching=!1,this._switchUrlOpts=null,this.config.startTime=void 0),t?this.config.url=t:t=this.config.url,await this._reset(i),await this._loadData(t),this._startTick()}async _loadData(t){var e,i,r,n;try{t&&(t=t.trim())}catch(t){}if(!t)return;let s=await this._loadM3U8(t),{currentStream:a}=this._playlist;if(this._urlSwitching){if(this.isLive){let t=this._playlist.setNextSegmentBySN(this._prevSegSn);S.log(`segment nb=${this._prevSegSn} index of ${t} in the new playlist`),-1===t&&(this._prevSegCc=null,this._prevSegSn=null)}else{0===a.bitrate&&(null===(e=this._switchUrlOpts)||void 0===e?void 0:e.bitrate)&&(a.bitrate=null===(r=this._switchUrlOpts)||void 0===r?void 0:r.bitrate);let t=typeof(null===(i=this._switchUrlOpts)||void 0===i?void 0:i.startTime);this.config.startTime=t;let n=this._playlist.findSegmentIndexByTime(t),s=this._playlist.getSegmentByIndex(n+1);if(s){let t=s.start;await this._bufferService.removeBuffer(t)}}}if(!s)return;if(this.isLive){if(this._bufferService.setLiveSeekableRange(0,4294967295),S.log("totalDuration first time got:",this._playlist.totalDuration),S.log("nb segments got:",this._playlist.nbSegments),this.config.targetLatency<this._playlist.totalDuration&&(this.config.targetLatency=this._playlist.totalDuration,this.config.maxLatency=1.5*this.config.targetLatency),!s.isMaster&&this._pollM3U8(t),this._playlist.nbSegments<this.config.minSegmentsStartPlay)return;await this._loadSegment();return}await this._bufferService.updateDuration(a.totalDuration);let{startTime:o}=this.config;o&&(!(null===(n=this._switchUrlOpts)||void 0===n?void 0:n.seamless)&&this.media&&(this.media.currentTime=o),this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(o)||0)),await this._loadSegment()}async replay(){var t;return this.config.startTime=0,this._urlSwitching=!1,this._switchUrlOpts=null,await this.load(),this._reloadOnPlay=!1,null===(t=this.media)||void 0===t?void 0:t.play().catch(()=>{})}async switchURL(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(typeof e){case"number":e={startTime:e};break;case"boolean":e={seamless:e};break;case"object":for(let t in e)(void 0===e[t]||null===e[t])&&delete e[t];break;default:throw`unsupported switchURL args: ${e}`}let{seamless:i,startTime:r}=e=Object.assign({},{seamless:!1,startTime:0,bitrate:0},e);if(this.config.url=t,this.config.startTime=r,this._switchUrlOpts=e,i)this._urlSwitching=!0,!this.isLive&&(this._prevSegSn=null,this._prevSegCc=null),this._playlist.reset(),this._bufferService.seamlessSwitch(),await this._clear(),await this._loadData(t),this._startTick();else{var n;let e;try{e=this.config.softDecode?this.load(t):await this.load(t)}catch(t){throw this._player.emit("switch_url_fail",t),t}return this._reloadOnPlay=!1,e&&this._player.emit(y.le.SWITCH_COMPLETE,{url:t}),null===(n=this.media)||void 0===n?void 0:n.play().catch(()=>{})}this._switchUrlOpts=null}async switchStream(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=this.currentStream,r=this.streams;if(!i||i.id===t||!r||r.length<2)return;let n=r.find(e=>e.id===t);if(n){try{await this._clear(),e&&await this._bufferService.clearAllBuffer()}catch(t){}if(i.currentAudioStream&&n.audioStreams.length>2){let t=i.currentAudioStream.id;n.currentAudioStream=n.audioStreams.find(e=>e.id===t)||n.currentAudioStream}this._playlist.currentStream=n;try{var s;(this.isLive||!n.segments.length)&&await this._refreshM3U8(),this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(null===(s=this.media)||void 0===s?void 0:s.currentTime)||0),this._prevSegCc=null,await this._loadSegmentDirect()}catch(t){throw this._playlist.currentStream=i,t}return this._startTick(),n}}async switchAudioStream(t){let e=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=this.currentStream;if(!i)return;let r=i.currentAudioStream;if(!r||r.id===t||i.audioStreams.length<2)return;let n=i.audioStreams.find(e=>e.id===t);if(n){try{await this._clear(),e&&await this._bufferService.clearAllBuffer()}catch(t){}i.currentAudioStream=n;try{var s;(this.isLive||!n.segments.length)&&await this._refreshM3U8(),this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(null===(s=this.media)||void 0===s?void 0:s.currentTime)||0),this._prevSegCc=null,await this._loadSegmentDirect()}catch(t){throw i.currentAudioStream=r,t}return this._startTick(),n}}async switchSubtitleStream(t){this._playlist.switchSubtitle(t),await this._manifestLoader.stopPoll(),await this._refreshM3U8()}async detachMedia(){this._bufferService&&await this._bufferService.detachMedia()}async destroy(){var t;this.media&&(this.removeAllListeners(),this._playlist.reset(),this._segmentLoader.reset(),null===(t=this._seiService)||void 0===t||t.reset(),this.off("core.sei",this._onSei),this.media.removeEventListener("loadeddata",this._onLoadeddata),this.media.removeEventListener("play",this._onPlay),this.media.removeEventListener("pause",this._onPause),this.media.removeEventListener("seeking",this._onSeeking),this.media.removeEventListener("timeupdate",this._onTimeupdate),await Promise.all([this._clear(),this._bufferService.destroy()]),this.media=void 0)}static isSupported(t){return t&&"video"!==t&&"audio"!==t?"undefined"!=typeof WebAssembly:l.d1.isSupported()}static enableLogger(){o.ZP.setEnable(!0)}static disableLogger(){o.ZP.setEnable(!1)}async _loadM3U8(t){var e,i,r;let n;try{let r=null===(i=this.config.manifestList)||void 0===i?void 0:null===(e=i.filter(e=>e.url===t)[0])||void 0===e?void 0:e.manifest;[n]=r?this._manifestLoader.parseText(r,t):await this._manifestLoader.load(t)}catch(t){throw this._emitError(u.Fc.network(t))}if(n)return this._playlist.upsertPlaylist(n),n.isMaster&&((null===(r=this._playlist.currentStream.subtitleStreams)||void 0===r?void 0:r.length)&&this._player.emit(p.j.SUBTITLE_PLAYLIST,{list:this._playlist.currentStream.subtitleStreams}),await this._refreshM3U8()),this._player.emit(p.j.STREAM_PARSED),n}_refreshM3U8(){var t,e;let i=this._playlist.currentStream;if(!i||!i.url)return;let r=i.url,n=null===(t=i.currentAudioStream)||void 0===t?void 0:t.url,s=null===(e=i.currentSubtitleStream)||void 0===e?void 0:e.url;return this._manifestLoader.load(r,n,s).then(t=>{let[e,i,a]=t;if(!!e)this._playlist.upsertPlaylist(e,i,a),this.isLive&&this._pollM3U8(r,n,s)}).catch(t=>{throw this._emitError(u.Fc.network(t))})}_pollM3U8(t,e,i){let r,n=this._playlist.isEmpty;if(this._playlist.lowLatency)r=1e3*(this._playlist.currentStream.partTargetDuration||0);else{var s;r=1e3*((null===(s=this._playlist.lastSegment)||void 0===s?void 0:s.duration)||0)}this._manifestLoader.poll(t,e,i,(t,e,i)=>{this._playlist.upsertPlaylist(t,e,i),this._playlist.clearOldSegment(),(t&&n&&!this._playlist.isEmpty||!this._playlist.hadSegmentLoaded&&this._playlist.nbSegments>=this.config.minSegmentsStartPlay)&&this._loadSegment(),n&&(n=this._playlist.isEmpty)},t=>{this._emitError(u.Fc.network(t))},r)}async _loadSegmentDirect(t){let e=this._playlist.nextSegment;if(!e)return;let i=!1,r=null;try{this._segmentProcessing=!0,S.log(`load segment, sn:${e.sn}, [${e.start}, ${e.end}], partIndex:${e.partIndex}`),i=await this._reqAndBufferSegment(e,this._playlist.getAudioSegment(e))}catch(t){r=t}finally{this._segmentProcessing=!1}if(r)return this._bufferService.isFull()?(S.log(`load segment, sn:${e.sn}, partIndex:${e.partIndex}`),this._segmentProcessing=!0,this._isProcessQuotaExceeded=!0,!1):this._emitError(u.Fc.network(r));if(i){var n,s;let i=this.bufferInfo().end;this.isLive&&!(null===(n=this.media)||void 0===n?void 0:n.seeking)&&i&&Math.abs(e.end-i)>1&&(S.warn(`segment: ${e.sn} expected end=${e.end}, real end=${i}`),this._playlist.feedbackLiveEdge(e,i));let r=(null===(s=this._playlist.currentStream)||void 0===s?void 0:s.url)===e.parentUrl;this._urlSwitching&&!r&&(S.warn("pre playlist segment appended!"),this._bufferService.seamlessSwitch()),this.isLive&&this._urlSwitching&&r&&(this._urlSwitching=!1,this._player.emit(y.le.SWITCH_COMPLETE,{url:this.config.url})),this._playlist.moveSegmentPointer(),e.isLast?this._end():!t&&this._loadSegment()}return i}async _reqAndBufferSegment(t,e){let i=t?t.cc:e.cc,r=this._prevSegCc!==i,n=[];try{n=await this._segmentLoader.load(t,e,r)}catch(t){throw t.fatal=!1,this._segmentLoader.error=t,t}if(!n[0])return!1;let s=await this._bufferService.decryptBuffer(...n);if(!s)return!1;let a=t?t.sn:e.sn,o=t?t.start:e.start,l=this._playlist.currentStream;this._bufferService.createSource(s[0],s[1],null==l?void 0:l.videoCodec,null==l?void 0:l.audioCodec);let h=Date.now(),c=this._prevSegSn===a-1;if(this.isLive&&this._urlSwitching){let t=this.bufferInfo().end;this._playlist.updateSegmentsRanges(a,t),S.warn(`update the new playlist liveEdge, segment id=${a}, buffer start=${t}, liveEdge=${this._playlist.liveEdge}`),o=t}return await this._bufferService.appendBuffer(t,e,s[0],s[1],r,c,o),this._player.emit(p.j.APPEND_COST,{elapsed:Date.now()-h,url:t.url}),await this._bufferService.evictBuffer(this.config.bufferBehind),this._prevSegCc=i,this._prevSegSn=a,!0}async _onCheckQuotaExceeded(){let t=this.media.currentTime,e=this.media.buffered,i=!1;for(let r=0;r<e.length;r++)if(e.start(0)>=t&&t<e.end(r)){i=!0;break}if(this._bufferService.isFull()){let t=i?this.config.bufferBehind:5,e=this.media.currentTime;e-t>0&&await this._bufferService.removeBuffer(0,e-t)}}_checkStreamTrackChange(t){let e=this._playlist.checkSegmentTrackChange(t,this._bufferService.nbSb);e&&this.switchURL(this.config.url,e.start+.2)}async _clear(){clearTimeout(this._disconnectTimer),this._stopTick(),await Promise.all([this._segmentLoader.cancel(),this._manifestLoader.stopPoll()]),this._segmentProcessing=!1}async _reset(){var t;let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._reloadOnPlay=!1,this._prevSegSn=null,this._prevSegCc=null,this._switchUrlOpts=null,this._playlist.reset(),this._segmentLoader.reset(),null===(t=this._seiService)||void 0===t||t.reset(),await this._clear(),this._bufferService.reset(e)}_end(){this._clear(),this._bufferService.endOfStream(),(this.media.readyState<=2||this.media.buffered.length>1)&&this._startTick()}_stopTick(){this._tickTimer&&clearTimeout(this._tickTimer),this._tickTimer=null}_startTick(){this._stopTick(),this._tickTimer=setTimeout(this._tick,this._tickInterval)}_emitError(t){var e,i,r,n;let s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(null===(e=t.originError)||void 0===e?void 0:e.fatal)===!1?S.warn(t):(S.table(t),S.error(t),S.error(null===(i=this.media)||void 0===i?void 0:i.error),(null===(r=this.media)||void 0===r?void 0:r.readyState)&&this.media.pause(),this._stopTick(),this._urlSwitching&&(this._urlSwitching=!1,this._player.emit("switch_url_fail",t)),this._player.emit(y.le.FLVERROR,t),s&&this._end(),null===(n=this._seiService)||void 0===n||n.reset()),t}_tryEos(){var t,e;if(this._isProcessQuotaExceeded)return;let{media:i}=this,{nextSegment:r,lastSegment:n}=this._playlist;if(!((!r||n&&s.l.isBuffered(i,n.start+n.duration/2))&&i.readyState&&i.duration>0&&(null===(t=this._bufferService)||void 0===t?void 0:t.msIsOpened)&&!(null===(e=this._bufferService)||void 0===e?void 0:e.msHasOpTasks)))return;let a=this.bufferInfo();i.paused&&!i.currentTime&&(a=this.bufferInfo(a.nextStart||.5)),(.1>Math.abs(a.end-i.duration)||!this.isLive&&n&&a.end>=n.start+n.duration)&&this._bufferService.endOfStream()}constructor(t,e){super(),(0,r._)(this,"media",void 0),(0,r._)(this,"config",void 0),(0,r._)(this,"_player",void 0),(0,r._)(this,"_manifestLoader",void 0),(0,r._)(this,"_segmentLoader",void 0),(0,r._)(this,"_playlist",void 0),(0,r._)(this,"_bufferService",void 0),(0,r._)(this,"_gapService",void 0),(0,r._)(this,"_seiService",void 0),(0,r._)(this,"_disconnectTimer",void 0),(0,r._)(this,"_tickTimer",void 0),(0,r._)(this,"_prevSegSn",null),(0,r._)(this,"_prevSegCc",null),(0,r._)(this,"_tickInterval",500),(0,r._)(this,"_segmentProcessing",!1),(0,r._)(this,"_reloadOnPlay",!1),(0,r._)(this,"_switchUrlOpts",null),(0,r._)(this,"_isProcessQuotaExceeded",!1),(0,r._)(this,"_urlSwitching",!1),(0,r._)(this,"_onSei",t=>{var e;null===(e=this._seiService)||void 0===e||e.addSample(t)}),(0,r._)(this,"_loadSegment",async()=>{if(this._segmentProcessing||!this.media)return;let{nextSegment:t,lastSegment:e}=this._playlist,{config:i}=this,r=Math.min(Math.max((null==e?void 0:e.duration)-.008||0,.016),.1);if(t){if(!this.isLive){let e=this.bufferInfo();this.media.paused&&!this.media.currentTime&&(e=this.bufferInfo(e.nextStart||.5));let n=Math.abs(e.end-this.media.duration)<r;if(e.remaining>=i.preloadTime||n){this._tryEos();return}if(i.preferMMSStreaming&&!this._bufferService.msStreaming)return;!this._urlSwitching&&this._prevSegSn!==t.sn-1&&e.end&&Math.abs(t.start-e.end)>1&&this._playlist.setNextSegmentByIndex(this._playlist.findSegmentIndexByTime(e.end+.1))}return this._loadSegmentDirect()}}),(0,r._)(this,"_onLoadeddata",()=>{this.isLive&&!this.config.mseLowLatency&&this.media.duration!==1/0&&this._bufferService.updateDuration(1/0).catch(t=>{})}),(0,r._)(this,"_onPlay",async()=>{if(this.media.seeking&&0===this.media.currentTime){S.debug("replay currentTime 0, return");return}clearTimeout(this._disconnectTimer),this._reloadOnPlay?(this._reloadOnPlay=!1,this.replay()):(await this._loadSegment(),this._startTick())}),(0,r._)(this,"_onPause",()=>{if(this.isLive){if(!this._reloadOnPlay){let{disconnectTime:t}=this.config;null==t&&(t=this._playlist.dvrWindow),Number.isFinite(t)&&(clearTimeout(this._disconnectTimer),this._disconnectTimer=setTimeout(()=>{this._reloadOnPlay=!0,this._clear()},t||0))}}else this._stopTick()}),(0,r._)(this,"_onSeeking",async()=>{if(!this.media)return;this._onCheckQuotaExceeded();let t=this.media.currentTime,e=this._playlist.seekRange;if(e){let i=(0,v.u)(t,e[0],this.isLive?e[1]:this.media.duration);if(i>=0&&Math.abs(t-i)>=.1){this.media.currentTime=i;return}}let i=this._playlist.currentSegment,r=s.l.info(s.l.get(this.media),t,.1);if(i&&(r.end&&.2>Math.abs(r.end-i.end)||this.isLive&&r.end))return;let n=this._playlist.findSegmentIndexByTime(t),a=this._playlist.getSegmentByIndex(n);null!=n&&a&&(!this._segmentProcessing||a!==this._playlist.nextSegment)&&(S.debug("seek to",t,a),this._playlist.setNextSegmentByIndex(n),this._stopTick(),await this._segmentLoader.cancel(),this._segmentProcessing=!1,(!r.end||this.isLive)&&await this._loadSegmentDirect(!0),this._startTick())}),(0,r._)(this,"_onTimeupdate",()=>{if(!this.media)return;let t=this.config;if(t.isLive&&t.maxLatency&&t.targetLatency){let e=this._playlist.liveEdge;if(!e)return;let i=e-this.media.currentTime;i>=t.maxLatency&&(S.debug(`latency jump, currentTime:${this.media.currentTime}, liveEdge:${e}, latency=${i}`),this.media.currentTime=e-t.targetLatency)}if(t.seiInTime){var e;null===(e=this._seiService)||void 0===e||e.throw(this.media.currentTime)}t.allowedStreamTrackChange&&!t.softDecode&&this.media.readyState&&this._checkStreamTrackChange(this.media.currentTime)}),(0,r._)(this,"_tick",()=>{if(!this.media)return;this._startTick();let t=this.media,e=this._segmentLoader.error;if(this._onCheckQuotaExceeded(),this._isProcessQuotaExceeded&&!this._bufferService.isFull()&&(this._isProcessQuotaExceeded=!1,this._segmentProcessing=!1),e){(!t.readyState||this.bufferInfo(.5).remaining<1)&&this._emitError(u.Fc.network(e));return}t.readyState&&((0,c.k)(t)?(this._loadSegment(),this._gapService&&this._gapService.do(t,this.config.maxJumpDistance,this.isLive)):t.readyState<2&&this._gapService&&this._gapService.do(t,this.config.maxJumpDistance,!t.currentTime||this.isLive)),!this.isLive&&this._tryEos()}),this.config=t=(0,f.i)(t),this._player=e,this.media=this.config.media,this._manifestLoader=new g.Y(this),this._segmentLoader=new _.b(this),this._playlist=new m.g(this),this._bufferService=new d.y(this),t.seiInTime&&(this._seiService=new h.Z(this)),!t.softDecode&&(this._gapService=new a.l),this.on("core.sei",this._onSei),this.media.addEventListener("loadeddata",this._onLoadeddata),this.media.addEventListener("play",this._onPlay),this.media.addEventListener("pause",this._onPause),this.media.addEventListener("seeking",this._onSeeking),this.media.addEventListener("timeupdate",this._onTimeupdate)}}try{localStorage.getItem("xgd")?b.enableLogger():b.disableLogger()}catch(t){}},329223:function(t,e,i){"use strict";i.d(e,{V2:function(){return k},ZP:function(){return L},eE:function(){return x}});var r=i(480333),n=i(629686),s=i(402748),a=i(811603);i(656562),i(992871),i(490629),i(679308),i(706056),i(374954),i(362051),i(518330),i(190932),i(808483),i(126159),i(100832),i(825666),i(943281),i(82726),i(414931);var o=i(404690),l=i(559865),h=i(216308),c=i(455195),u=i(81030),d=i(603846),f=i(783696),p=i(495312),g=i(487359),m=i(952655),_=i(34768),v=i(742744),y=i(835597),S=i(894140),b=i(454715),E=i(626705),w=i(549816);let T=()=>new o.S(new URL(i.p+i.u("25786"),i.b),Object.assign({},{name:"webcodecs-player-0.0.2-alpha.86-2026070605"},{type:void 0})),k=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise((e,i)=>{let r=new Promise((t,e)=>{let i=T();i.onmessage=e=>{var r;(null===(r=e.data)||void 0===r?void 0:r.type)===_.Zo.MESSAGE_EVENT_ISREADY&&(p.T.preWorkerIsReady(),i.onmessage=null,u.Yz.add(i),t())},i.onerror=t=>{e(t)},null==i||i.postMessage({type:_.Zo.ISREADY})});Promise.all([r,t.disablePreCreateWorkerLet?Promise.resolve():x(t.preCreateAudioContextList)]).then(()=>{e()}).catch(t=>{i(t)})})},x=t=>new Promise((e,i)=>{!t&&(t=(0,b.Uw)()),Promise.all(t.map(t=>(0,S.Zy)({sampleRate:t.sampleRate,channelCount:t.channelCount,latencyHint:t.latencyHint}).then(t=>{t&&S.Lx.register(t)}).catch(t=>{throw t}))).then(()=>{e()}).catch(t=>{i(t)})});class L extends h.v{get isLive(){return[f.b.FLV,f.b.RTM,f.b.RTM_WEBTS].includes(this._cfg.protocol)}get coreType(){return this._coreType}get isPiP(){let{media:t}=this;if(!t)return!1;let e=!1;return"undefined"!=typeof window&&"documentPictureInPicture"in window&&(e=t.ownerDocument.defaultView===documentPictureInPicture.window),!!e||document.pictureInPictureElement===t||"picture-in-picture"===t.webkitPresentationMode||!1}bindEventListener(){if(!!this._media)this._media.addEventListener("source_error",this._onSourceError),this._media.addEventListener("error",this._onMediaError),this._media.addEventListener("timeupdate",this._onTimeupdate,{once:!0}),this._media.addEventListener("playing",this._onPlaying,{once:!0})}unBindEventListener(){if(!!this._media)this._media.removeEventListener("source_error",this._onSourceError),this._media.removeEventListener("error",this._onMediaError),this._media.removeEventListener("timeupdate",this._onTimeupdate),this._media.removeEventListener("playing",this._onPlaying)}resetAutoPlayState(){this.autoPlayState.autoPlayStarted=!1,this.autoPlayState.autoplayWasPrevented=!1}_setTimelineData(){this._startTimelines={startstage:"",startmessage:"",httpCode:-1,httpError:[],reqtime:-1,downgradetime:-1,fcost:-1,ffcost:-1,startbufferlength:-1,playerError:"",playErrorMessage:"",startdelta:-1,loadstarttime:-1,loadeddatatime:-1,loadstarttype:-1,loadeddatatype:-1,playtime:-1,playerstate:"",stepList:[],workerInitTime:-1,firstByteTime:-1,loadMetaTime:-1,metaParseTime:-1,decodeCostTime:-1}}get media(){return this._media}updateLastStep(t,e){var i,r;this._lastStep=t;let a=(0,c.je)(),o=(0,s._)((0,n._)({state:t,t1:a-this._lastStateTime,t2:a-this._stateStartTime},e),{vid:(null===(r=this._cfg)||void 0===r?void 0:null===(i=r.mediaInfo)||void 0===i?void 0:i.id)||""});this._startTimelines.stepList.push(t),this._stepInfoList.push(o),this._lastStateTime=a,this._logger.log(`updateLastStep: ${t}, ${JSON.stringify(o)}`)}play(){var t;if(this._logger.log("play",this._isPaused,this._canplay,this.autoPlayState.autoPlayStarted),this._isPaused=!1,this.updateLastStep("callplayin"),!this._canplay)return Promise.resolve();this.updateLastStep("callplaycanplay"),this._playTimer=null;let e=null===(t=this._media)||void 0===t?void 0:t.play();return(e&&e.then?e.then(()=>{this.onPlayFulfilled()}).catch(t=>{var e,i,r;if(!!this._media){if(this.dispatchMediaEvent(d.c.PLAY_REJECTED),null===(e=this._media)||void 0===e?void 0:e.error){this._logger.log("media.play catch video error",null==t?void 0:t.name,null==t?void 0:t.message,null===(i=this._media.error)||void 0===i?void 0:i.code,null===(r=this._media.error)||void 0===r?void 0:r.message);return}this.isLive||"audioContext"===this._cfg.audioOutputMode||this._mediaPlayRetry?(null==t?void 0:t.name)==="NotAllowedError"&&this.onPlayPrevented():(this._mediaPlayRetry=!0,this._logger.log("media.play catch err, muted retry",null==t?void 0:t.name,null==t?void 0:t.message,this._media.muted),(null==t?void 0:t.name)==="NotAllowedError"&&!this._media.muted&&(this._media.muted=!0),this._playTimer=setTimeout(this.play.bind(this),0))}}):this.onPlayFulfilled(),e&&e.then)?e:Promise.resolve()}onPlayFulfilled(){this.dispatchMediaEvent(d.c.PLAY_FULFILLED),this.onAutoPlayStarted()}onPlayPrevented(){if(!!this._media&&!this.autoPlayState.autoPlayStarted&&!this.autoPlayState.autoplayWasPrevented)this.autoPlayState.autoplayWasPrevented=!0,this._media.pause(),this._logger.log("play emit autoplay_was_prevented",this._media.paused),this._autoplayWasPreventedTimer=setTimeout(()=>{this._autoplayWasPreventedTimer=null,this.updateLastStep(m.ef.AUTOPLAY_WAS_PREVENTED),this.dispatchMediaEvent(d.c.AUTOPLAY_WAS_PREVENTED)},0)}onAutoPlayStarted(){!this.autoPlayState.autoPlayStarted&&(this._startTimelines.playtime=Date.now(),this.autoPlayState.autoPlayStarted=!0,this.updateLastStep(m.ef.AUTOPLAY_STARTED),this.dispatchMediaEvent(d.c.AUTOPLAY_STARTED))}get startTimelines(){let t;if(this._coreType===m.MR.MediaStream)t=this.runtime.buffered;else{var e;t=null===(e=this.media)||void 0===e?void 0:e.buffered}let i=[];if(t)for(let e=0;e<t.length;e++)t.start&&(null==t?void 0:t.end)&&i.push({start:t.start(e),end:t.end(e)});return this._startTimelines.startdelta=Date.now()-this._startTimelines.loadstarttime,this._startTimelines.startbufferlength=JSON.stringify(i),this._startTimelines.playerstate=JSON.stringify(this._stepInfoList),this._startTimelines.loadeddatatime>0&&(this._startTimelines.fcost=this._startTimelines.loadeddatatime-this._startTimelines.reqtime),this._startTimelines}_bindInteractionEvent(){if(this._workerSink&&(this._workerSink.addEventListener("message",this._onWorkerSinkMessage),this._workerSink.addEventListener("error",this._onWorkerSinkError)),this._transConfigEventUp(),this._transEventUp(_.Zo.MEDIACODEC_CONFIG),this._transEventUp(_.Zo.TRANSMIT_LOG),this._transEventUp(_.Zo.SEAMLESS_LOAD_STREAM),this._transEventUp(_.Zo.CANCEL_SWITCH),this._transEventUp(_.Zo.PLAY),this._transEventUp(_.Zo.PAUSE),this._transEventUp(_.Zo.MUTED_SET),this._transEventUp(_.Zo.LOOP_CHANGE),this._transEventUp(_.Zo.PLAYBACKRATE),this._transEventUp(_.Zo.CURRENT_TIME),this._transEventUp(_.Zo.ERROR),this._transEventUp(_.Zo.FREQUENT_STATISTICS),this._transEventUp(_.Zo.VISIBILITYSTATE),this._transWritableComponentUp(),!!this._workerSink)this.on(_.Zo.MESSAGE_INIT_RENDER,this.onInitRender),this.on(_.Zo.MESSAGE_FIRSTFRAME,this.onFirstFrame),this.on(_.Zo.MESSAGE_STATISTICS,this.onStatistics),this.on(_.Zo.MESSAGE_EVENT_LOADEDMETADATA,this.onLoadedmetadata),this.on(_.Zo.MESSAGE_EVENT_DURATIONCHANGE,this.onDurationChange),this.on(_.Zo.MESSAGE_EVENT_WAITING,()=>{this.dispatchMediaEvent(d.c.WAITING)}),this.on(_.Zo.MESSAGE_EVENT_SEEKING,this.onSeeking),this.on(_.Zo.MESSAGE_EVENT_PLAYING,()=>{this.dispatchMediaEvent(d.c.PLAYING)}),this.on(_.Zo.MESSAGE_EVENT_CANPLAY,()=>this.dispatchMediaEvent(d.c.CANPLAY)),this.on(_.Zo.MESSAGE_EVENT_SEEKED,this.onSeeked),this.on(_.Zo.MESSAGE_EVENT_PROGRESS,this.onProgress),this.on(_.Zo.MESSAGE_EVENT_ENDED,this.onEnded),this.on(_.Zo.MESSAGE_EVENT_RATECHANGE,this.onRateChange),this.on(_.Zo.MESSAGE_EVENT_VEERROR,this.onVEError),this.on(y.o.SWITCH_COMPLETE,this.onSwitchComplete),this.on(y.o.CHANGE_URL,this.onChangeURL),this.on(y.o.DELETE_PCDN_URL,t=>{var e,i;"audio"===t.mediaType?null===(e=this._cfg.pcdnAudioUrlList)||void 0===e||e.shift():null===(i=this._cfg.pcdnUrlList)||void 0===i||i.shift()}),this.on(_.Zo.PROCESS_ERROR,this.onVEError),this.on(_.Zo.MESSAGE_EVENT_RECEIVESUCCESS,this.onWorkerEnable),this.on(_.Zo.MESSAGE_EVENT_DROPFRAMES,this.onDropFrames),this.on(_.Zo.MESSAGE_EVENT_SEGMENT_DONE,this.onSegmentDone),this.on(_.Zo.MESSAGE_EVENT_PRELOAD_CACHE,this.onPreloadCache),this.on(_.Zo.SRSTATE_CHANGE,this.onSRStateChange)}get frequentStatistics(){return this._frequentStatistics}set frequentStatistics(t){this._frequentStatistics=t,this.emit(_.Zo.FREQUENT_STATISTICS,{enable:t})}moveAway(){this._startTimelines.startmessage=this._stepInfoList.findLast(t=>0>t.state.indexOf("f-")),this.updateLastStep("moveaway")}destroy(){var t,e;this._logger.log("destroy"),this.unBindEventListener(),this.offAll(),this.closeRender(!0);let i=!(null===(t=this._cfg.worker)||void 0===t?void 0:t.recylable)&&!(null===(e=this._audioTrack)||void 0===e?void 0:e.writable);this.closeWorker(i),this._videoTrack=null,this._playTimer&&(clearTimeout(this._playTimer),this._playTimer=null),this._autoplayWasPreventedTimer&&(clearTimeout(this._autoplayWasPreventedTimer),this._autoplayWasPreventedTimer=null),this.downloadVolumebalancePCM(this._volumeBalancePCM,"volumebalance"),this.downloadVolumebalancePCM(this._volumeBalancePrePCM,"volumebalance_pre")}async getLog(){let t=`[${this._logger.name}] main thread:
|
|
${g.ZP.getLoggerCache()}
|
|
baseInfo: ${this.printMediaBaseInfo()}`,e="";return this.emit(_.Zo.TRANSMIT_LOG),await new Promise(t=>{this.once(_.Zo.MESSAGE_TRANS_LOG,i=>{let{data:r}=i;e=`${r}`,t(!0)})}),`${t}
|
|
|
|
${e}`}printMediaBaseInfo(){var t,e,i;return`currentTime: ${null===(t=this._media)||void 0===t?void 0:t.currentTime}
|
|
muted: ${null===(e=this._media)||void 0===e?void 0:e.muted}
|
|
pause: ${null===(i=this._media)||void 0===i?void 0:i.paused}`}normalizeConfig(t){this._initLog(t.enableLog,this._instanceId),t.enableLog=g.ZP.enable,t.logLevel=g.ZP.level,t.broadcastChannelName=this._instanceId,(0,b.CN)(t),(0,l.R)(this._cfg,t),!this._cfg.protocol&&(this._cfg.protocol=f.b.FLV)}_initLog(t,e){g.ZP.setEnable("boolean"==typeof t?t:g.ZP.enable?g.ZP.enable:(0,g.l7)()),g.ZP.enable&&(g.ZP.level=(0,g.RM)()),e&&(this._logger.loggerID=e)}_transEventUp(t){this.on(t,e=>{this.postMsgToWorker((0,n._)({type:t},e))})}onVolumebalanceData(t,e){let i=new Float32Array(t.length+this._volumeBalancePCM.length);i.set(this._volumeBalancePCM,0),i.set(t,this._volumeBalancePCM.length),this._volumeBalancePCM=i;let r=new Float32Array(e.length+this._volumeBalancePrePCM.length);r.set(this._volumeBalancePrePCM,0),r.set(e,this._volumeBalancePrePCM.length),this._volumeBalancePrePCM=r}downloadVolumebalancePCM(t,e){if(0===t.length)return;let i=new Int16Array(t.length);for(let e=0;e<t.length;e++){let r=Math.max(-1,Math.min(1,t[e]));r=r<0?32768*r:32767*r,i[e]=r}let r=new DataView(new ArrayBuffer(2*i.length));for(let t=0;t<i.length;t++)r.setInt16(2*t,i[t],!0);let n=new Blob([r],{type:"application/octet-stream"}),s=document.createElement("a"),a=URL.createObjectURL(n);s.href=a,s.download=`${e}.pcm`,s.click(),URL.revokeObjectURL(a),t=new Float32Array(0)}_transConfigEventUp(){this.on(_.Zo.PROTOCOL_CONFIG,t=>{var e;let i=[];(null==t?void 0:null===(e=t.preloadDataInfo)||void 0===e?void 0:e.transferable)&&Array.isArray(t.preloadDataInfo.preloadDataList)&&(this.updateLastStep(m.ef.PRELOAD_Hit),i=t.preloadDataInfo.preloadDataList.map(t=>t.data.buffer));let r=[];t.stream instanceof ReadableStream&&r.push(t.stream);let s=t.webTsSDKStream instanceof ReadableStream?t.webTsSDKStream:null;s&&r.push(s);let a=[];t.writeable&&(t.writeable.videoWritable instanceof WritableStream&&a.push(t.writeable.videoWritable),t.writeable.audioWritable instanceof MessagePort&&a.push(t.writeable.audioWritable));let o=[...i,...r,...a];!this.postMsgToWorker((0,n._)({type:_.Zo.PROTOCOL_CONFIG},t),o)&&s&&s.cancel().catch(()=>{})})}_transWritableComponentUp(){this.on(_.Zo.WRITABLE,t=>{this.postMsgToWorker((0,n._)({type:_.Zo.WRITABLE},t),[null==t?void 0:t.videoWritable,null==t?void 0:t.audioWritable].filter(Boolean))})}onDownWritable(t){var e;let i=S.Lx.get(t.id||(null===(e=t.audioTrack)||void 0===e?void 0:e.id));i&&(t.audioWritable&&(i.writable=t.audioWritable,i.writableNeutered=!1),this._releaseAudioTrack(i)),t.isDestroy&&this.closeWorker(!0,t.worker)}checkVideoDecodeTimeout(t){t.code===w.t.DECODE_VIDEO_DODECODE_TIMEOUT&&p.T.addLowVideoDecodeCnt()}closeRender(t){let e=this._audioTrack;this._logger.log("try close render",t,!!e),this.postMsgToWorker({type:_.Zo.DESTROY,isDestroy:t,id:null==e?void 0:e.id}),e&&this._releaseAudioTrack(e)}_releaseAudioTrack(t){var e;let i=t.track,r=t.mediaStream;i&&(null==r?void 0:r.getAudioTracks().includes(i))&&r.removeTrack(i),t.mediaStream=void 0,null===(e=t.setOutput)||void 0===e||e.call(t),t.setEnabled?t.setEnabled(!1):t.track&&(t.track.enabled=!1),S.Lx.setStatus(t,"idle")}closeWorker(){var t,e;let i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0;this._logger.log(`closeWorker immediately: ${i}, worker: ${!!r}`);let n=r||this._workerSink;if(!n){this.updateLastStep(m.ef.CLOSE_WORKER,{message:"worker not exit"});return}i?(null===(t=this._cfg.worker)||void 0===t?void 0:t.recylable)?(this.updateLastStep("workerrecylableim"),u.Yz.exist(n)&&(n.removeEventListener("message",this._onWorkerSinkMessage),n.removeEventListener("error",this._onWorkerSinkError),n.onmessage&&(n.onmessage=null),n.onerror&&(n.onerror=null))):(this.updateLastStep("workerterminate"),n.terminate(),u.Yz.remove(n)):((null===(e=this._cfg.worker)||void 0===e?void 0:e.recylable)&&(this.updateLastStep("workerrecylable"),this._cfg.audioWorkerLetInWorker&&(n.removeEventListener("message",this._onWorkerSinkMessage),n.removeEventListener("error",this._onWorkerSinkError),n.onmessage&&(n.onmessage=null),n.onerror&&(n.onerror=null)),!u.Yz.exist(n)&&(this._logger.log("add worker into workerPool"),u.Yz.add(n))),this._workerSink=void 0)}dispatchMediaEvent(t,e){var i;t!==d.c.PROGRESS&&t!==d.c.TIMEUPDATE&&t!==d.c.DROP_FRAMES&&this._logger.log("dispatchMediaEvent=>",t),null===(i=this._media)||void 0===i||i.dispatchEvent(new CustomEvent(t,{detail:e}))}onInitRender(t){}onWorkerEnable(){}onDropFrames(t){this.dispatchMediaEvent(d.c.DROP_FRAMES,{dropFrames:t.dropFrames})}onSegmentDone(t){this.emit(m.Xe.SEGMENT_DONE,t)}onPreloadCache(t){this.emit(m.Xe.PRELOAD_CACHE,t)}onSRStateChange(t){this._srState=t}get srState(){return this._srState}onVEError(t){if(this._logger.error(`main thread occur error => code ${t.code}, message ${t.message}, ext ${JSON.stringify(t.ext)}`),this._startTimelines.playerError=t.code,this._startTimelines.playErrorMessage=t.message,this.updateLastStep("ve_error",{code:t.code,message:t.message,ext:JSON.stringify(t.ext)}),this.checkVideoDecodeTimeout(t),this._logger.table(t),this._errorInfo)return;this._errorInfo=t;let e=`[${this._logger.name}] main thread:
|
|
${g.ZP.getLoggerCache()}
|
|
baseInfo: ${this.printMediaBaseInfo()}`;t.log&&this.dispatchMediaEvent(d.c.LOGGER_CACHE,{log:`${e} work thread ${t.log}`}),this.dispatchMediaEvent(d.c.ERROR,this._errorInfo)}onStatistics(t){let e=t.data;this.runtime.speedInfo=e.speedInfo}resetWorkerSinkState(){this.postMsgToWorker({type:_.Zo.RESET})}addMessageObserver(t){this._messageObservers.add(t)}removeMessageObserver(t){this._messageObservers.delete(t)}hasObservers(){return this._messageObservers.size>0}notifyObservers(t){this._messageObservers.forEach(e=>{try{e(t)}catch(t){this._logger.error("Message observer error:",t)}})}postMsgToWorker(t,e){if(!this._workerSink)return!1;let i=null;t.instanceId=this._instanceId;try{e&&e.length>0?this._workerSink.postMessage(t,e):this._workerSink.postMessage(t)}catch(t){this._logger.error("Error sending message to worker:",t),i=t}if(this.hasObservers()){let e={type:i?`${t.type}_error`:t.type,data:i?(0,s._)((0,n._)({},t),{error:i.message||i}):t,timestamp:Date.now(),direction:"main_to_worker",id:`${Date.now()}_${Math.random().toString(36).substr(2,9)}`};this.notifyObservers(e)}if(i){let t=w.t.VEWORKER_POST_MESSAGE_ERROR;"DataCloneError"===i.name&&(t=w.t.VEWORKER_POST_MESSAGE_CLONE_ERROR),this.onVEError(w.Z.create(t,i.message||"post message to worker error",i))}return!i}setSRRunning(t){if(!this._cfg.sr){this._srState.running=!1;this._srState.code=5;return}this.postMsgToWorker({type:_.Zo.SR_RUNNING,usingSR:t})}reportLog(){let t=`[${this._logger.name}] main thread:${g.ZP.getLoggerCache()} baseInfo: ${this.printMediaBaseInfo()}`,e=null,i=this.once(_.Zo.MESSAGE_TRANS_LOG,i=>{let{data:r}=i;e&&clearTimeout(e),this.dispatchMediaEvent(d.c.LOGGER_CACHE,{log:`${t}
|
|
|
|
${r}`})});e=setTimeout(()=>{i(),this.dispatchMediaEvent(d.c.LOGGER_CACHE,{log:t})},500),this.emit(_.Zo.TRANSMIT_LOG)}constructor(t,e){var l;if(super(),(0,r._)(this,"_logger",new g.ZP("MainSink")),(0,r._)(this,"runtime",new E.r),(0,r._)(this,"_media",void 0),(0,r._)(this,"_workerSink",void 0),(0,r._)(this,"_audioTrack",null),(0,r._)(this,"_videoTrack",null),(0,r._)(this,"_frequentStatistics",!1),(0,r._)(this,"_errorInfo",null),(0,r._)(this,"_startTimelines",{}),(0,r._)(this,"_hasFirstFramed",!1),(0,r._)(this,"_coreType",void 0),(0,r._)(this,"_mediaPlayRetry",!1),(0,r._)(this,"_autoplayWasPreventedTimer",void 0),(0,r._)(this,"_playTimer",void 0),(0,r._)(this,"_isPaused",null),(0,r._)(this,"_canplay",!1),(0,r._)(this,"_lastStep",""),(0,r._)(this,"_videoDecodeTimeputCnt",0),(0,r._)(this,"_isReUseWorker",!1),(0,r._)(this,"_stateStartTime",(0,c.je)()),(0,r._)(this,"_lastStateTime",(0,c.je)()),(0,r._)(this,"_stepInfoList",[]),(0,r._)(this,"_cfg",{}),(0,r._)(this,"autoPlayState",{autoPlayStarted:!1,autoplayWasPrevented:!1}),(0,r._)(this,"_workerInitStartTime",void 0),(0,r._)(this,"_volumeBalancePCM",new Float32Array(0)),(0,r._)(this,"_volumeBalancePrePCM",new Float32Array(0)),(0,r._)(this,"_instanceId",(0,c.f6)()),(0,r._)(this,"_isMultiInstanceWorker",!1),(0,r._)(this,"_srState",{running:!1,code:0,message:""}),(0,r._)(this,"_onMediaError",()=>{var t,e,i,r;this.updateLastStep("error",{code:null===(e=this._media)||void 0===e?void 0:null===(t=e.error)||void 0===t?void 0:t.code,message:null===(r=this._media)||void 0===r?void 0:null===(i=r.error)||void 0===i?void 0:i.message})}),(0,r._)(this,"_onTimeupdate",()=>{if(!!this._media)this.updateLastStep("timeupdate",{curTime:this._media.currentTime}),this.postMsgToWorker({type:_.Zo.STARTPLAY})}),(0,r._)(this,"_onPlaying",()=>{this.updateLastStep(m.ef.PLAYING)}),(0,r._)(this,"_onSourceError",t=>{if(!this._hasFirstFramed){var e,i;let r=`${this._coreType}-host:${null==t?void 0:t.host}-${null==t?void 0:t.code}-${null==t?void 0:t.message}`;this.updateLastStep(m.ef.SOURCE_ERROR,{message:r}),null===(i=this._startTimelines)||void 0===i||null===(e=i.httpError)||void 0===e||e.push({message:r,httpCode:null==t?void 0:t.errorCode})}}),(0,r._)(this,"_onWorkerSinkMessage",t=>{var e,i;let r=null===(e=t.data)||void 0===e?void 0:e.type,o=null===(i=t.data)||void 0===i?void 0:i.instanceId;if(o&&o!==this._instanceId)return;let l={type:r,data:t.data,timestamp:Date.now(),direction:"worker_to_main",id:`${Date.now()}_${Math.random().toString(36).substr(2,9)}`};if(this.notifyObservers(l),0===r.indexOf("f-")){let e=t.data,{type:i}=e,o=(0,a._)(e,["type"]);this.updateLastStep(r,o),r===_.Zo.workerinit?(this._startTimelines.workerInitTime=o.costtime,this.isLive&&this.emit("workerinit",(0,s._)((0,n._)({},o),{workerinitStartTime:this._workerInitStartTime}))):r===_.Zo.outputvideo?this.startTimelines.decodeCostTime=o.costTime:r===_.Zo.firstbyte?this.startTimelines.firstByteTime=o.costTime:r===_.Zo.loadmeta?this.startTimelines.loadMetaTime=o.costTime:r===_.Zo.metaparse&&(this.startTimelines.metaParseTime=o.costTime);return}if(-1===[_.Zo.MESSAGE_EVENT_PROGRESS,_.Zo.MESSAGE_EVENT_TIMEUPDATE,y.o.SEI,y.o.RTM_NETWORK,v.le.PROP_SPEED].indexOf(r)&&this._logger.log(`receive message: ${r}`),"error"===t.data.type){this.onVEError(w.Z.create(t.data.code,t.data.message,t.data.ext,t.data.log,t.data.errorType,t.data.httpCode,t.data.url));return}if(t.data.type===_.Zo.DOWN_WRITABLE){t.data.worker=t.currentTarget,this.onDownWritable(t.data);return}if(t.data.type===_.Zo.VOLUMEBALANCE_DATA){this.onVolumebalanceData(t.data.data,t.data.pre);return}this.emit(t.data.type,t.data)}),(0,r._)(this,"_onWorkerSinkError",t=>{this.onVEError(w.Z.create(w.t.VEWORKER_RUNTIME_ERROR,(null==t?void 0:t.message)||"VEWORKER_RUNTIME_ERROR",t))}),(0,r._)(this,"_messageObservers",new Set),this._setTimelineData(),this.resetAutoPlayState(),this.normalizeConfig(e),this._media=t,this._coreType=e.coreType,this._logger.log(`core init! id: ${this._instanceId}`),(null===(l=this._cfg.worker)||void 0===l?void 0:l.enable)!==!1){let{useSharedWorkingGroup:t,recylable:e}=this._cfg.worker||{};e&&(t&&u.Cc.getInstanceCount()>0&&(this._workerSink=u.Cc.getWorker()),!this._workerSink&&u.Yz.size>0&&(this._workerSink=u.Yz.pop()),this._workerSink&&(this._isReUseWorker=!0)),!this._workerSink&&(this.isLive?(this._workerInitStartTime=Date.now(),this._workerSink=new o.S(new URL(i.p+i.u("13508"),i.b),Object.assign({},{name:"webcodecs-flv-player-0.0.2-alpha.86-2026070605"},{type:void 0}))):this._workerSink=T(),this._isReUseWorker=!1),!this.isLive&&t&&u.Cc.associateWorkerWithInstance(this._instanceId,this._workerSink)}this.bindEventListener(),this._bindInteractionEvent()}}},453412:function(t,e,i){"use strict";async function r(t){let e={},i=await t;return e.timestamp=Date.now(),null==i||i.forEach(t=>{"inbound-rtp"===t.type?(e.packetsLost=t.packetsLost,e.packetsReceived=t.packetsReceived,e.bytesReceived=t.bytesReceived):"candidate-pair"===t.type?(e.rtt=1e3*t.currentRoundTripTime,e.total_rtt=1e3*t.totalRoundTripTime):"track"===t.type&&void 0!==t.audioLevel||t.type}),e}function n(t,e){let i=o(t,e,"timestamp"),r=o(t,e,"packetsLost"),n=o(t,e,"packetsReceived");return{bytesReceived:e.bytesReceived||0,audioLossRate:+(r/(n+r)).toFixed(2)||0,receivedKBitrate:+(8*o(t,e,"bytesReceived")/i).toFixed(2)||0,statsInterval:i,rtt:e.rtt||0,packetsReceived:n}}async function s(t){let e={},i=await t;return e.timestamp=Date.now(),null==i||i.forEach(t=>{"inbound-rtp"===t.type?(e.packetsLost=t.packetsLost,e.packetsReceived=t.packetsReceived,e.bytesReceived=t.bytesReceived,e.firCount=t.firCount,e.nackCount=t.nackCount,e.pliCount=t.pliCount):"candidate-pair"===t.type&&(e.rtt=1e3*t.currentRoundTripTime,e.totalRtt=1e3*t.totalRoundTripTime)}),e}function a(t,e){let i=o(t,e,"timestamp"),r=o(t,e,"packetsLost"),n=o(t,e,"nackCount"),s=o(t,e,"packetsReceived");return{statsInterval:i,bytesReceived:e.bytesReceived||0,videoLossRate:+(r/(o(t,e,"packetsReceived")+r)).toFixed(2)||0,receivedKBitrate:+(8*o(t,e,"bytesReceived")/i).toFixed(2)||0,rtt:e.rtt||0,totalRtt:Math.round(e.totalRtt||0),packetsReceived:s,firCount:o(t,e,"firCount"),nackCount:n,pliCount:o(t,e,"pliCount"),retransmittedRate:+(n/(s+r)).toFixed(2)}}function o(t,e,i){let r=Number.isFinite(t[i])?+t[i]:0;return Math.max(0,(Number.isFinite(e[i])?+e[i]:0)-r)}i.d(e,{At:function(){return s},IE:function(){return a},cX:function(){return r},xt:function(){return n}}),i(679308),i(104882)},792973:function(t,e,i){"use strict";i.d(e,{Bh:function(){return a},Dt:function(){return s.Dt},G6:function(){return s.G6},KR:function(){return n.K},N1:function(){return l},SE:function(){return r.S},dB:function(){return o},vU:function(){return s.vU}}),i(414931),i(374954),i(190932),i(808483),i(126159),i(100832),i(825666),i(943281),i(82726);var r=i(218013),n=i(839714),s=i(161231);function a(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(t[e]<<24>>>0)+(t[e+1]<<16)+(t[e+2]<<8)+(t[e+3]||0)}function o(t){let e,i="avc1.";for(let r=0;r<3;r++)(e=t[r].toString(16)).length<2&&(e=`0${e}`),i+=e;return i}function l(t){let e=[],i=t.length;if(i<=48)return t;for(let r=0;r<i-4;)0===t[r]&&0===t[r+1]&&3===t[r+2]&&t[r+3]<=3?(e.push(r+2),r+=3):r+=1;if(e.length){let r=new Uint8Array(i-e.length),n=0;return e.map((s,a)=>{let o=e[a-1]||-1,l=t.slice(o+1,s);r.set(l,n),n+=l.length,a===e.length-1&&s+1<i&&r.set(t.slice(s+1),n)}),r}return t}},945502:function(t,e,i){"use strict";i.d(e,{Z:function(){return o}}),i(932651),i(14275),i(759943),i(414931),i(228983),i(706056);var r=i(856445),n=i(852013),s=i(182811),a=i(114376);class o extends r.Z{init(){this._checkCurrentValue(),this._dragOffset=0}_checkCurrentValue(){let t;let{currentValue:e,min:i,max:r}=this.getStates();Array.isArray(e)?((t=[])[0]=this._checkValidity(e[0],i,r),t[1]=this._checkValidity(e[1],i,r)):t=this._checkValidity(e,i,r),this._adapter.updateCurrentValue(t)}destroy(){this._adapter.unSubscribeEventListener()}_getHandleCenterPosition(t,e){let i=e.getBoundingClientRect(),{x:r,y:n}=this.handleMousePos(i.left+.5*i.width,i.top+.5*i.height);return t?n:r}constructor(t){var e;super(Object.assign(Object.assign({},o.defaultAdapter),t)),e=this,this.getMinAndMaxPercent=t=>{let{range:e,min:i,max:r}=this._adapter.getProps(),n=e?(t[0]-i)/(r-i):(t-i)/(r-i),s=e?(t[1]-i)/(r-i):1;return{min:this._checkValidity(n),max:this._checkValidity(s)}},this._checkValidity=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return t>i?i:t<e?e:t},this.computeHandleVisibleVal=(t,e,i)=>{let r;let{focusPos:n,currentValue:s}=this._adapter.getStates(),a={min:!1,max:!1};return r=e?{min:e(i?this.outPutValue(s[0]):this.outPutValue(s)),max:i?e(this.outPutValue(s[1])):null}:{min:i?this.outPutValue(s[0]):this.outPutValue(s),max:i?this.outPutValue(s[1]):null},t?(a.min=!0,a.max=!0):void 0===t&&e&&("min"===n?a.min=!0:"max"===n&&(a.max=!0)),{tipVisible:a,tipChildren:r}},this.valueFormatIsCorrect=t=>Array.isArray(t)?"number"==typeof t[0]&&"number"==typeof t[0]:"number"==typeof t,this.handleMousePos=(t,e)=>{let i=this._adapter.getParentRect(),r=this._adapter.getScrollParentVal(),n=i?i.left:0,s=i?i.top:0;return{x:t-n+r.scrollLeft,y:e-s+r.scrollTop}},this.getScrollParent=t=>{let e=/(auto|scroll)/,i=(t,e)=>window.getComputedStyle(t,null).getPropertyValue(e),r=t=>e.test(i(t,"overflow")+i(t,"overflow-y")+i(t,"overflow-x")),n=t=>t&&t!==document.body&&t instanceof Element?r(t)?t:n(t.parentNode):document.body;return n(t)},this.checkMeetMinMax=t=>{let e,i;let{vertical:r,verticalReverse:n,range:s}=this._adapter.getProps(),a=this._adapter.getState("currentValue");this.transValueToPos(a);let{sliderX:o,sliderY:l,sliderWidth:h,sliderHeight:c}=this._adapter.getSliderLengths(),{chooseMovePos:u,isDrag:d}=this._adapter.getStates();return e=r&&n?l+(r?c:h):r?l:o,i=r&&n?l:r?l+c:o+h,r&&n?t>=e?t=e:t<=i&&(t=i):t<=e?t=e:t>=i&&(t=i),t},this.transPosToValue=(t,e)=>{let i,r;let n=this.checkMeetMinMax(t),{min:s,max:a,currentValue:o}=this._adapter.getStates(),{range:l,vertical:h,step:c,verticalReverse:u}=this._adapter.getProps(),{sliderX:d,sliderY:f,sliderWidth:p,sliderHeight:g}=this._adapter.getSliderLengths(),m=h?f:d,_=h?g:p;return(i=h&&u?(m+_-n)/_*(a-s)+s:(n-m)/_*(a-s)+s,r=l?e?o[0]:o[1]:o,1!==c&&(i=Math.round(i/c)*c),l&&i!==r)?e?[i,o[1]]:[o[0],i]:!l&&i!==r&&i},this.transValueToPos=t=>{let{min:e,max:i}=this._adapter.getStates(),{vertical:r,range:n,verticalReverse:s}=this._adapter.getProps(),{sliderX:a,sliderY:o,sliderWidth:l,sliderHeight:h}=this._adapter.getSliderLengths(),c=r?o:a,u=r?h:l;return n?[(t[0]-e)*u/(i-e)+c,(t[1]-e)*u/(i-e)+c]:(t-e)*u/(i-e)+c},this.isMarkActive=t=>{let{min:e,max:i,range:r,included:n}=this._adapter.getProps(),s=this._adapter.getState("currentValue");return"number"==typeof(t/1)&&!!(t>=e)&&!!(t<=i)&&(r?(t>s[1]||t<s[0])&&n?"unActive":"active":t<=s&&n?"active":"unActive")},this.outPutValue=t=>{let e=t=>{var e,i;return/^\d+(\.\d+)?$/.test(String(t))?null!==(i=null===(e=t.toString().split(".")[1])||void 0===e?void 0:e.length)&&void 0!==i?i:0:0},i=this._adapter.getProp("step"),r=(()=>{let t=Math.pow(10,e(i));return e=>Math.round(e*t)/t})();if(!Array.isArray(t))return r(t);{let e=r(t[0]),i=r(t[1]);return e>i?"min"===this.getState("focusPos")?[i,i]:[e,e]:[e,i]}},this.handleDisabledChange=t=>{this._adapter.updateDisabled(t)},this.checkAndUpdateIsInRenderTreeState=()=>this._adapter.checkAndUpdateIsInRenderTreeState(),this.calculateOutputValue=(t,e)=>{let i=this.transPosToValue(t,e);if(!1!==i)return this.outPutValue(i)},this.handleValueChange=(t,e)=>{let{min:i,max:r}=this._adapter.getStates(),n=null,s={};this.valueFormatIsCorrect(e)?(Array.isArray(t)&&Array.isArray(e)&&(n=Object.assign(s,{currentValue:e=[e[0]<i?i:e[0],e[1]>r?r:e[1]]})),"number"==typeof t&&"number"==typeof e&&(n=Object.assign(s,{currentValue:e=e>r?r:e<i?i:e}))):n=s,n&&this._adapter.transNewPropsToState(n)},this.onHandleDown=(t,e)=>{this._adapter.onHandleDown(t);let i=this._adapter.getState("disabled"),{vertical:r}=this._adapter.getProps(),{dragging:n}=this._adapter.getOverallVars();if(i)return!1;this._adapter.setStateVal("isDrag",!0),this._adapter.setStateVal("chooseMovePos",e),"min"===e?this._adapter.setDragging([!0,n[1]]):this._adapter.setDragging([n[0],!0]);let s=this.handleMousePos(t.clientX,t.clientY),a=r?s.y:s.x;if(this._adapter.isEventFromHandle(t)){let e=this._getHandleCenterPosition(r,t.target);this._dragOffset=a-e,a=e}else this._dragOffset=0;return!0},this.onHandleMove=t=>{this._adapter.setEventDefault(t);let{disabled:e,chooseMovePos:i}=this._adapter.getStates(),{vertical:r}=this._adapter.getProps(),{dragging:n}=this._adapter.getOverallVars();if(e)return!1;this.onHandleEnter(i);let s=this.handleMousePos(t.clientX,t.clientY),a=r?s.y:s.x;if(a-=this._dragOffset,"min"===i&&n[0]||"max"===i&&n[1]){let t=this.calculateOutputValue(a,"min"===i);if(void 0===t)return!1;this._adapter.notifyChange(t),this._adapter.onHandleMove(a,"min"===i,void 0,!1,t)}return!0},this.onHandleTouchStart=(t,e)=>{let i=this._adapter.getMinHandleEl(),r=this._adapter.getMaxHandleEl();if(t.target===i||t.target===r){(0,a.Jt)(t);let i=(0,n.Z)(t.touches[0],t);this.onHandleDown(i,e)}},this.onHandleTouchMove=t=>{let e=this._adapter.getMinHandleEl(),i=this._adapter.getMaxHandleEl();if(t.target===e||t.target===i){let e=(0,n.Z)(t.touches[0],t);this.onHandleMove(e)}},this.onHandleEnter=t=>{let{disabled:e,focusPos:i}=this._adapter.getStates();!e&&!i&&t!==i&&this._adapter.onHandleEnter(t)},this.onHandleLeave=()=>{let t=this._adapter.getState("disabled"),e=this._adapter.getState("isDrag");!t&&!e&&this._adapter.onHandleLeave()},this.onHandleUp=t=>{this._adapter.onHandleUpBefore(t);let{disabled:e,chooseMovePos:i}=this._adapter.getStates(),{dragging:r}=this._adapter.getOverallVars();return!e&&("min"===i?this._adapter.setDragging([!1,r[1]]):this._adapter.setDragging([r[0],!1]),this._adapter.setStateVal("isDrag",!1),this._adapter.onHandleLeave(),this._adapter.onHandleUpAfter(),!0)},this._handleValueDecreaseWithKeyBoard=(t,e)=>{let{min:i,currentValue:r}=this.getStates(),{range:n}=this.getProps();if("min"===e){if(n){let e=r[0]-t;return[e=e<i?i:e,r[1]]}{let e=r-t;return e=e<i?i:e}}{let e=r[1]-t;return e=e<r[0]?r[0]:e,[r[0],e]}},this._handleValueIncreaseWithKeyBoard=(t,e)=>{let{max:i,currentValue:r}=this.getStates(),{range:n}=this.getProps();if("min"===e){if(n){let e=r[0]+t;return[e=e>r[1]?r[1]:e,r[1]]}{let e=r+t;return e=e>i?i:e}}{let e=r[1]+t;return e=e>i?i:e,[r[0],e]}},this._handleHomeKey=t=>{let{min:e,currentValue:i}=this.getStates(),{range:r}=this.getProps();return"min"!==t?[i[0],i[0]]:r?[e,i[1]]:e},this._handleEndKey=t=>{let{max:e,currentValue:i}=this.getStates(),{range:r}=this.getProps();return"min"!==t?[i[0],e]:r?[i[1],i[1]]:e},this.handleKeyDown=(t,e)=>{let i;let{min:r,max:n,currentValue:s}=this.getStates(),{step:o,range:l}=this.getProps();switch(t.key){case"ArrowLeft":case"ArrowDown":i=this._handleValueDecreaseWithKeyBoard(o,e);break;case"ArrowRight":case"ArrowUp":i=this._handleValueIncreaseWithKeyBoard(o,e);break;case"PageUp":i=this._handleValueIncreaseWithKeyBoard(10*o,e);break;case"PageDown":i=this._handleValueDecreaseWithKeyBoard(10*o,e);break;case"Home":i=this._handleHomeKey(e);break;case"End":i=this._handleEndKey(e)}if(["ArrowLeft","ArrowDown","ArrowRight","ArrowUp","PageUp","PageDown","Home","End"].includes(t.key)){let e=!0;(e=Array.isArray(s)?!(s[0]===i[0]&&s[1]===i[1]):s!==i)&&(this._adapter.updateCurrentValue(i),this._adapter.notifyChange(i)),(0,a.Jt)(t)}},this._noTooltip=()=>{let{tipFormatter:t,tooltipVisible:e}=this.getProps();return null===t||!1===e},this.onFocus=(t,e)=>{if(this._noTooltip())return;(0,a.Jt)(t);let{target:i}=t;try{i.matches(":focus-visible")&&("min"===e?this._adapter.setStateVal("firstDotFocusVisible",!0):this._adapter.setStateVal("secondDotFocusVisible",!0))}catch(t){(0,s.Z)(!0,"Warning: [Semi Slider] The current browser does not support the focus-visible")}},this.onBlur=(t,e)=>{if(this._noTooltip())return;let{firstDotFocusVisible:i,secondDotFocusVisible:r}=this.getStates();"min"===e?i&&this._adapter.setStateVal("firstDotFocusVisible",!1):r&&this._adapter.setStateVal("secondDotFocusVisible",!1)},this.handleWrapClick=t=>{let{disabled:e,isDrag:i}=this._adapter.getStates();if(i||e||this._adapter.isEventFromHandle(t))return;let{vertical:r}=this.getProps(),n=this.handleMousePos(t.clientX,t.clientY),s=r?n.y:n.x,a=this.checkWhichHandle(s),o=this.calculateOutputValue(s,a);if(void 0===o)return;if(this._adapter.notifyChange(o),!this._isControlledComponent())this.setHandlePos(s,a,!0,o)},this.setHandlePos=function(t,i){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;e._adapter.onHandleMove(t,i,()=>e._adapter.onHandleUpAfter(),r,n)},this.checkWhichHandle=t=>{let{vertical:e,verticalReverse:i}=this.getProps(),{currentValue:r}=this._adapter.getStates(),n=this.transValueToPos(r),s=!0;return Array.isArray(n)&&(t>n[1]||Math.abs(t-n[0])>Math.abs(t-n[1]))&&(s=!1),e&&i&&(s=!s),s},this.handleWrapperEnter=()=>{this._adapter.setStateVal("showBoundary",!0)},this.handleWrapperLeave=()=>{this._adapter.setStateVal("showBoundary",!1)}}}},948265:function(t,e,i){"use strict";i(932651);var r=i(101199);function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}).apply(this,arguments)}let s=r.forwardRef(function(t,e){return r.createElement("svg",n({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,ref:e},t),r.createElement("path",{d:"M6.25453 8C7.52035 6.18526 9.62248 5 12 5C15.866 5 19 8.13401 19 12C19 15.866 15.866 19 12 19C9.06392 19 6.54768 17.192 5.5085 14.6248C5.30128 14.1129 4.71828 13.8658 4.20635 14.0731C3.69441 14.2803 3.4474 14.8633 3.65463 15.3752C4.989 18.6717 8.22142 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C9.17165 3 6.6492 4.30477 5 6.34299V5C5 4.44772 4.55228 4 4 4C3.44772 4 3 4.44772 3 5V9C3 9.55228 3.44772 10 4 10H8C8.55228 10 9 9.55228 9 9C9 8.44772 8.55228 8 8 8H6.25453Z",fill:"currentColor"}))});s.elementType="Icon",e.Z=s},640543:function(t,e,i){"use strict";i(679308),Promise.all([i.e("74792"),i.e("67539"),i.e("20551"),i.e("5974"),i.e("70494"),i.e("45015")]).then(i.bind(i,102093)),Promise.all([i.e("74792"),i.e("67539"),i.e("20551"),i.e("5974"),i.e("70494"),i.e("45015")]).then(i.bind(i,522573)),Promise.all([i.e("74792"),i.e("67539"),i.e("20551"),i.e("5974"),i.e("70494"),i.e("45015")]).then(i.bind(i,735608)),Promise.all([i.e("74792"),i.e("67539"),i.e("20551"),i.e("5974"),i.e("70494"),i.e("45015")]).then(i.bind(i,825710))},616376:function(t,e,i){"use strict";function r(t,e,i,r,n,s,a){try{var o=t[s](a),l=o.value}catch(t){return void i(t)}o.done?e(l):Promise.resolve(l).then(r,n)}function n(t){return function(){var e=this,i=arguments;return new Promise(function(n,s){var a=t.apply(e,i);function o(t){r(a,n,s,o,l,"next",t)}function l(t){r(a,n,s,o,l,"throw",t)}o(void 0)})}}i.d(e,{Z:function(){return n}})},92833:function(t,e,i){"use strict";i.d(e,{Z:function(){return a}});var r=i(508881),n=i(290481),s=i(278997);function a(t){var e=(0,n.Z)();return function(){var i,n=(0,r.Z)(t);return i=e?Reflect.construct(n,arguments,(0,r.Z)(this).constructor):n.apply(this,arguments),(0,s.Z)(this,i)}}},600123:function(t,e,i){"use strict";i.d(e,{_:function(){return n}});var r=i(718046);function n(t,e){if("object"!==(0,r._)(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!==(0,r._)(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}},958818:function(t,e,i){"use strict";function r(t,e,i,r){return i.safe(t.value,r)}i.d(e,{f:function(){return r}})},934163:function(t,e,i){"use strict";i.d(e,{t:function(){return a}});var r=i(890131),n=i(368183),s=i(252819);let a={tokenize:function(t){let e,i,r;let a=this,l=[],h=0;return c;function c(e){if(h<l.length){let i=l[h];return a.containerState=i[1],t.attempt(i[0].continuation,u,d)(e)}return d(e)}function u(t){if(h++,a.containerState._closeFlow){let i;a.containerState._closeFlow=void 0,e&&S();let r=a.events.length,n=r;for(;n--;)if("exit"===a.events[n][0]&&"chunkFlow"===a.events[n][1].type){i=a.events[n][1].end;break}y(h);let o=r;for(;o<a.events.length;)a.events[o][1].end={...i},o++;return(0,s.d)(a.events,n+1,0,a.events.slice(r)),a.events.length=o,d(t)}return c(t)}function d(i){if(h===l.length){if(!e)return g(i);if(e.currentConstruct&&e.currentConstruct.concrete)return _(i);a.interrupt=!!(e.currentConstruct&&!e._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(o,f,p)(i)}function f(t){return e&&S(),y(h),g(t)}function p(t){return a.parser.lazy[a.now().line]=h!==l.length,r=a.now().offset,_(t)}function g(e){return a.containerState={},t.attempt(o,m,_)(e)}function m(t){return h++,l.push([a.currentConstruct,a.containerState]),g(t)}function _(r){if(null===r){e&&S(),y(0),t.consume(r);return}return e=e||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:e,contentType:"flow",previous:i}),function e(i){if(null===i){v(t.exit("chunkFlow"),!0),y(0),t.consume(i);return}return(0,n.Ch)(i)?(t.consume(i),v(t.exit("chunkFlow")),h=0,a.interrupt=void 0,c):(t.consume(i),e)}(r)}function v(t,n){let o=a.sliceStream(t);if(n&&o.push(null),t.previous=i,i&&(i.next=t),i=t,e.defineSkip(t.start),e.write(o),a.parser.lazy[t.start.line]){let t,i,n=e.events.length;for(;n--;)if(e.events[n][1].start.offset<r&&(!e.events[n][1].end||e.events[n][1].end.offset>r))return;let o=a.events.length,l=o;for(;l--;)if("exit"===a.events[l][0]&&"chunkFlow"===a.events[l][1].type){if(t){i=a.events[l][1].end;break}t=!0}for(y(h),n=o;n<a.events.length;)a.events[n][1].end={...i},n++;(0,s.d)(a.events,l+1,0,a.events.slice(o)),a.events.length=n}}function y(e){let i=l.length;for(;i-- >e;){let e=l[i];a.containerState=e[1],e[0].exit.call(a,t)}l.length=e}function S(){e.write([null]),i=void 0,e=void 0,a.containerState._closeFlow=void 0}}},o={tokenize:function(t,e,i){return(0,r.f)(t,t.attempt(this.parser.constructs.document,e,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}}},818652:function(t,e,i){"use strict";i.d(e,{K:function(){return r}});let r=window.requestIdleCallback?window.requestIdleCallback:t=>setTimeout(t,100)}}]); |