aegis.f.min.js 82 KB

12345678910
  1. /**
  2. * =================================================================
  3. * aegis-web-sdk@1.37.5 (c) 2023 TencentCloud Real User Monitoring.
  4. * Author pumpkincai.
  5. * Last Release Time Mon Jun 26 2023 14:20:23 GMT+0800 (中国标准时间).
  6. * Released under the MIT License.
  7. * Thanks for supporting RUM & Aegis!
  8. * =================================================================
  9. **/
  10. !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Aegis=t()}(this,function(){"use strict";var _,U;function H(e){this.name="__st"+(1e9*Math.random()>>>0)+_+"__",null!=e&&e.forEach(this.add,this),_+=1}Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var o=arguments[1],i=0;i<n;){var r=t[i];if(e.call(o,r,i,t))return r;i+=1}}}),window.WeakSet||(_=Date.now()%1e9,H.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},H.prototype.delete=function(e){return!!e[this.name]&&!(e[this.name]=void 0)},H.prototype.has=function(e){return!!e[this.name]},U=H,Object.defineProperty(window,"WeakSet",{value:function(e){return new U(e)}})),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if(null!=(o=arguments[n]))for(var o=Object(o),i=Object.keys(Object(o)),r=0,a=i.length;r<a;r++){var s=i[r],l=Object.getOwnPropertyDescriptor(o,s);null!=l&&l.enumerable&&(t[s]=o[s])}return t}});var D=function(e,t){return(D=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)},b=function(){return(b=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function c(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),i=0,t=0;t<n;t++)for(var r=arguments[t],a=0,s=r.length;a<s;a++,i++)o[i]=r[a];return o}function F(t){try{return encodeURIComponent(decodeURIComponent(t))}catch(e){return t}}var n,G=/_?t(\d)?(imestamp)?=\d+&?/g,j=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8"],q=["ResizeObserver loop limit exceeded","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],W=["ext1","ext2","ext3","level","trace","tag","seq","code"],V=["static","fetch"],X=(e.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},e.prototype.on=function(e,t,n){var o;if(void 0===n&&(n=0),this)return(o=this.eventsList[e])||(this.eventsList[e]=[],o=this.eventsList[e]),-1===this.indexOf(o,t)&&o.push({name:e,type:n||0,callback:t}),this},e.prototype.one=function(e,t){this.on(e,t,1)},e.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(e){}}return null}},e.prototype.clear=function(){this.eventsList={}},e),K=function(e){if(!e||0===e.length)return"{}";e=Array.isArray(e)?e:[e];var t=Object.keys(e[0]),n={};return t.forEach(function(t){n[t]=e.map(function(e){return e[t]})}),n.count=e.length,ce(n)};function e(){var a=this;this.emit=function(e,t){if(a){var n;if(null!=(o=a.eventsList[e])&&o.length)for(var o=o.slice(),i=0;i<o.length;i++){n=o[i];try{var r=n.callback.apply(a,[t]);if(1===n.type&&a.remove(e,n.callback),!1===r)break}catch(e){throw e}}return a}},this.eventsList={}}(t=n=n||{})[t.number=-1]="number",t.string="";function J(e,t){return"number"==typeof e||"string"==typeof e?e:t?n.string:n.number}function P(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e}function z(e,t){return void 0===t&&(t=2048),String(e).replace(G,"").slice(0,t)}function Y(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null===location||void 0===location?void 0:location.protocol):/^https/.test(e)}function $(e,t,n){var o,i;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(r=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?"unknown":r,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:"unknown",isErr:!1};"function"==typeof(null==(o=null==t?void 0:t.ret)?void 0:o.join)&&(se=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var r,a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==se.indexOf(e.toLowerCase())});return a.length?{code:""+(r="未知"!==(r=e[a[0]])&&""!==r?r:"unknown"),isErr:0!==r&&"0"!==r&&"unknown"!==r}:{code:"unknown",isErr:!1}}catch(e){return{code:"unknown",isErr:!1}}}function x(e,t,n){try{var o="function"==typeof t?t(e,null==n?void 0:n.url)||"":e;return ue(o).slice(0,102400)}catch(e){return""}}function Z(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function u(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||pe.test(t)||j.some(function(e){return-1<t.indexOf(e)})}function Q(n,o){var i,r=[],a=n.config;return n.lifeCycle.on("destroy",function(){r.length=0}),function(e,t){Array.isArray(e)?r=r.concat(e):r.push(e),o&&r.length>=o||n.sendNow&&0<r.length?(r=he(r),t(r.splice(0,r.length)),i&&clearTimeout(i)):(i&&clearTimeout(i),i=setTimeout(function(){i=null,0<(r=he(r)).length&&t(r.splice(0,r.length))},a.delay))}}function ee(e,t){return Array.isArray(e)?t(e.map(function(e){return t=b(b({},e),{msg:"string"==typeof e.msg?e.msg:[].concat(e.msg).map(S).join(" ")}),W.forEach(function(e){t[e]||delete t[e]}),t;var t})):t([b(b({},e),{msg:"string"==typeof e.msg?e.msg:S(e.msg)})])}function te(l,c){return function(e,t){var n,o,i,r=Array.isArray(e),a=r?e:[e],s=(l.lifeCycle.emit("beforeRequest",e),l.config.beforeRequest);(a="function"==typeof s?a.map(function(t){try{var e=s({logs:t,logType:c});return(null==e?void 0:e.logType)===c&&null!=e&&e.logs?e.logs:!1!==e&&t}catch(e){return t}}).filter(function(e){return!1!==e}):a).length&&(n=a,e=W,!Array.isArray(n)||n.length<=1||(o=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&o.push(t)})}),0<o.length&&(n=n.map(function(e){var t={};return o.forEach(function(e){t[e]=""}),b(b({},t),e)}))),a=n,t(r?a:a[0]))}}function ne(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var o=n(e);"object"==typeof o&&"url"in o&&(e=o)}catch(e){console.error(e)}t(e)}}function oe(o){return function(e,t){null!=(n=o.lifeCycle)&&n.emit("afterRequest",e);var n=(o.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}}function m(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||we)}:n.reduce(function(n,o){return function(e,t){return void 0===t&&(t=we),n(e,function(e){return null==o?void 0:o(e,t)})}});throw new TypeError("createPipeline need at least one function param")}function ie(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}var O,E,d,re=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],ae=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/gi,se=["ret","retcode","code","errcode"],le=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"==typeof t&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},S=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,le(),4)||"undefined").replace(/"/gim,""):JSON.stringify(e,le(),4)||"undefined"}catch(e){return"error happen when aegis stringify: \n "+e.message+" \n "+e.stack}},ce=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,le())||"undefined"}catch(e){return"error happen when aegis stringify: \n "+e.message+" \n "+e.stack}},ue=function(n,o){void 0===o&&(o=3);var i,r,a,s="";return Array.isArray(n)?(s+="[",i=n.length,n.forEach(function(e,t){s=(s+="object"==typeof e&&1<o?ue(e,o-1):fe(e))+(t===i-1?"":",")}),s+="]"):n instanceof Object?(s="{",r=Object.keys(n),a=r.length,r.forEach(function(e,t){"object"==typeof n[e]&&1<o?s+='"'+e+'":'+ue(n[e],o-1):s+=de(e,n[e]),s+=t===a-1||t<a-1&&void 0===n[r[t+1]]?"":","}),s+="}"):s+=n,s},de=function(e,t){var n=typeof t,o="";return"string"==n||"object"==n?o+='"'+e+'":"'+t+'"':"function"==typeof t?o+='"'+e+'":"function '+t.name+'"':"symbol"==typeof t?o+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!=n||(o+='"'+e+'": '+t),o},fe=function(e){var t=typeof e;return""+("undefined"==t||"symbol"==t||"function"==t?"null":"string"==t||"object"==t?'"'+e+'"':e)},pe=/data:(image|text|application|font)\/.*;base64/,he=((t=O=O||{}).INFO_ALL="-1",t.API_RESPONSE="1",t.INFO="2",t.ERROR="4",t.PROMISE_ERROR="8",t.AJAX_ERROR="16",t.SCRIPT_ERROR="32",t.IMAGE_ERROR="64",t.CSS_ERROR="128",t.CONSOLE_ERROR="256",t.MEDIA_ERROR="512",t.RET_ERROR="1024",t.REPORT="2048",t.PV="4096",t.EVENT="8192",t.PAGE_NOT_FOUND_ERROR="16384",t.WEBSOCKET_ERROR="32768",t.BRIDGE_ERROR="65536",t.LAZY_LOAD_ERROR="131072",(t=E=E||{}).LOG="log",t.SPEED="speed",t.PERFORMANCE="performance",t.OFFLINE="offline",t.WHITE_LIST="whiteList",t.VITALS="vitals",t.PV="pv",t.CUSTOM_PV="customPV",t.EVENT="event",t.CUSTOM="custom",t.SDK_ERROR="sdkError",t.SET_DATA="setData",t.LOAD_PACKAGE="loadPackage",(t=d=d||{}).production="production",t.development="development",t.gray="gray",t.pre="pre",t.daily="daily",t.local="local",t.test="test",t.others="others",function(e){return e.filter(function(n,o){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&o<t})})}),ge=function(e){e.level===O.INFO_ALL&&(e.level=O.INFO)},v={},y={},me=function(e){return v[e]||(v[e]=setTimeout(function(){y[e]={},v[e]=null},6e4)),v[e]},ve=function(e){return(Array.isArray(e)?e:[e]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:O.INFO,msg:""})})},ye=function(o){return function(e){return o.sendPipeline([function(e,n){return n({url:o.config.url||"",data:K(ve(e)),method:"post",contentType:"application/json",type:E.LOG,log:e,requestConfig:{timeout:5e3},success:function(){var t=o.config.onReport;"function"==typeof t&&e.forEach(function(e){t(e)}),"function"==typeof n&&n([])}})}],E.LOG)(e)}},we=function(){},t=(Object.defineProperty(w.prototype,"__version__",{get:function(){return console.warn("__version__ has discard, please use version"),"1.37.5"},enumerable:!1,configurable:!0}),Object.defineProperty(w.prototype,"LogType",{get:function(){return console.warn("LogType has discard, please use logType"),O},enumerable:!1,configurable:!0}),w.prototype.init=function(e){this.setConfig(e);for(var t=0;t<w.installedPlugins.length;t++)try{w.installedPlugins[t].patch(this)}catch(e){this.sendSDKError(e)}this.lifeCycle.emit("onInited")},w.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,o=e.version,i=e.ext1,r=e.ext2,a=e.ext3,s=e.aid,l=e.env,c=void 0===l?"production":l,l=e.pageUrl,e=this.bean.id!==t||this.bean.uin!==n||this.bean.aid!==s;return this.bean.id=t||"",this.bean.uin=n||"",this.bean.version=o||"1.37.5",this.bean.aid=s||"",this.bean.env=function(){switch(c){case d.production:case d.development:case d.gray:case d.pre:case d.daily:case d.local:case d.test:case d.others:return 1;default:return}}()?c:d.others,l&&this.extendBean("from",encodeURIComponent(l.slice(0,2048))),i&&this.extendBean("ext1",encodeURIComponent(i)),r&&this.extendBean("ext2",encodeURIComponent(r)),a&&this.extendBean("ext3",encodeURIComponent(a)),e&&this.lifeCycle.emit("onConfigChange",this.config),this.config},w.use=function(e){-1===w.installedPlugins.indexOf(e)&&e.aegisPlugin&&w.installedPlugins.push(e)},w.unuse=function(e){e=w.installedPlugins.indexOf(e);-1!==e&&w.installedPlugins.splice(e,1)},w.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:O.INFO,msg:e};1===e.length&&e[0].msg&&Object.assign(n,b({},e[0]),{level:O.INFO}),this.normalLogPipeline(n)},w.prototype.infoAll=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:O.INFO_ALL,msg:e};1===e.length&&e[0].msg&&Object.assign(n,b({},e[0]),{level:O.INFO_ALL}),this.normalLogPipeline(n)},w.prototype.report=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:O.REPORT,msg:e};1===e.length&&e[0].msg&&Object.assign(n,b({},e[0])),this.normalLogPipeline(n)},w.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:O.ERROR,msg:e};1===e.length&&e[0].msg&&Object.assign(n,b({},e[0]),{level:O.ERROR}),this.normalLogPipeline(n)},w.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},w.prototype.reportPv=function(n){var o,i=this;n&&(console.warn("reportPv is deprecated, please use reportEvent"),o=""+Object.getOwnPropertyNames(this.bean).filter(function(e){return"id"!==e}).map(function(e){return e+"="+i.bean[e]}).join("&"),this.sendPipeline([function(e,t){t({url:i.config.url+"/"+n+"?"+o,addBean:!1,type:E.CUSTOM_PV})}],E.CUSTOM_PV)(null))},w.prototype.reportEvent=function(e){e&&((e="string"==typeof e?{name:e,ext1:this.config.ext1||"",ext2:this.config.ext2||"",ext3:this.config.ext3||""}:e).name?("string"!=typeof e.name&&(console.warn("reportEvent params name must be string"),e.name=String(e.name)),this.eventPipeline(e)):console.warn("reportEvent params error"))},w.prototype.reportTime=function(e,t){if("object"==typeof e)return this.reportT(e);"string"==typeof e?"number"==typeof t?t<0||6e4<t?console.warn("reportTime: duration must between 0 and 60000"):this.submitCustomTime(e,t):console.warn("reportTime: second param must be number"):console.warn("reportTime: first param must be a string")},w.prototype.reportT=function(e){var t=e.name,n=e.duration,o=e.ext1,o=void 0===o?"":o,i=e.ext2,i=void 0===i?"":i,r=e.ext3,r=void 0===r?"":r,e=e.from;if("string"==typeof t&&"number"==typeof n&&"string"==typeof o&&"string"==typeof i&&"string"==typeof r){if(!(n<0||6e4<n))return this.submitCustomTime(t,n,o,i,r,void 0===e?"":e);console.warn("reportTime: duration must between 0 and 60000")}else console.warn("reportTime: params error")},w.prototype.time=function(e){"string"==typeof e?this.timeMap[e]?console.warn("Timer "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("time: first param must be a string")},w.prototype.timeEnd=function(e){"string"==typeof e?this.timeMap[e]?(this.submitCustomTime(e,Date.now()-this.timeMap[e]),delete this.timeMap[e]):console.warn("Timer "+e+" does not exist"):console.warn("timeEnd: first param must be a string")},w.prototype.submitCustomTime=function(e,t,n,o,i,r){this.customTimePipeline({name:e,duration:t,ext1:n||this.config.ext1,ext2:o||this.config.ext2,ext3:i||this.config.ext3,from:r||void 0})},w.prototype.extendBean=function(e,t){this.bean[e]=t},w.prototype.sendPipeline=function(e,t){var n,r=this;return m(c([function(e,t){if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},te(n=this,t)],e,[ne(this),function(o,i){r.request(o,function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r.failRequestCount=0,i({isErr:!1,result:t,logType:null==o?void 0:o.type,logs:null==o?void 0:o.log}),null!=(e=null==o?void 0:o.success)&&e.call.apply(e,c([o],t))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++r.failRequestCount&&r.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&r.destroy(),i({isErr:!0,result:t,logType:null==o?void 0:o.type,logs:null==o?void 0:o.log}),null!=(e=null==o?void 0:o.fail)&&e.call.apply(e,c([o],t))})},oe(this)]))},w.prototype.send=function(e,i,r){var t=this;return m([ne(this),function(n,o){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];o({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=r&&r.apply(void 0,e)})},oe(this)])(e)},w.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},w.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},w.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(S(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.37.5)",addBean:!1,method:"get",type:E.SDK_ERROR,log:e})}],E.SDK_ERROR)(e)},w.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,o=w.instances.indexOf(this);-1!==o&&w.instances.splice(o,1);for(var i=w.installedPlugins.length-1;0<=i;i--)try{w.installedPlugins[i].unpatch(this)}catch(e){this.sendSDKError(e)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var r=this;r.constructor!==Object&&ie(r,this),r=Object.getPrototypeOf(r););0===w.instances.length&&(o=Object.getPrototypeOf(this).constructor,ie(o),ie(w))}},w.version="1.37.5",w.instances=[],w.logType=O,w.environment=d,w.installedPlugins=[],w),o=(i.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewAegis(e))},i.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},i.prototype.countInstance=function(){return this.instances.length},i.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},i.prototype.walk=function(n){var o=this;this.instances.forEach(function(e){var t=o.canUse(e);t&&n(e,t)})},i.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!=typeof e)||!!e},i.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},i.prototype.exist=function(e){return-1===this.instances.indexOf(e)},i.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},i.prototype.triggerOnNewAegis=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewAegis)&&t.call(this.option,e,this.getConfig(e))},i);function i(e){this.aegisPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}function w(e){var n,t,o,i,a,r,s,l,c,u,d,f,p,h,g=this;this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,hostUrl:"https://aegis.qq.com",env:"production",url:"",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:"",reportImmediately:!0},this.isWhiteList=!1,this.lifeCycle=new X,this.bean={},this.normalLogPipeline=m([Q(this,5),ee,function(e,t){var o=n.config;t(e=e.map(function(e){var t,n=o.maxLength||102400;try{if(!e.msg||e.msg.length<=n)return e;e.msg=null==(t=e.msg)?void 0:t.substring(0,n)}catch(t){e.msg=S(e.msg).substring(0,o.maxLength)}return e}))},(h=(n=this).config,function(e,t){var n="number"==typeof h.repeat?h.repeat:60;if(n<=0)return t(e);var o=(null==h?void 0:h.id)+"_error",i=y[o]||{};t(e.filter(function(e){if(e.level===O.ERROR||e.level===O.PROMISE_ERROR||e.level===O.AJAX_ERROR||e.level===O.SCRIPT_ERROR||e.level===O.IMAGE_ERROR||e.level===O.CSS_ERROR||e.level===O.MEDIA_ERROR||e.level===O.RET_ERROR||e.level===O.BRIDGE_ERROR||e.level===O.PAGE_NOT_FOUND_ERROR||e.level===O.WEBSOCKET_ERROR||e.level===O.LAZY_LOAD_ERROR){e=e.msg.slice(0,200);if(i[e]>n)return v[o]||me(o),!1;i[e]=1+~~i[e],y[o]=i}return!0}))}),(f=this.lifeCycle.emit,p=this.config,function(e,t){var n,o=p.logCreated;return"function"==typeof o?(n=e.filter(function(e){return!1!==o(e)}),f("beforeWrite",n),t(n)):(f("beforeWrite",e),t(e))}),(d=this,setTimeout(function(){var e=d.config,t=e.pvUrl,n=void 0===t?"":t,t=e.spa,e=-1<["web-sdk","mp-sdk"].indexOf("web-sdk");n&&(e&&!t||!e)&&d.sendPipeline([function(e,t){t({url:n,type:E.PV})}],E.PV)(null)},100),function(e,t){t(e)}),(c=l=s=!1,u=[],(a=this).lifeCycle.on("onConfigChange",function(){r&&clearTimeout(r),r=setTimeout(function(){var e,n;!c&&a.config&&(c=!0,e=a.config.whiteListUrl,(n=void 0===e?"":e)&&a.sendPipeline([function(e,t){t({url:n,type:E.WHITE_LIST,success:function(e){l=!0;try{var t=e.data||JSON.parse(e),n=t.retcode,o=t.result,i=void 0===o?{}:o,r=(0===n&&(s=i.is_in_white_list,a.isWhiteList=s,0<=i.rate)&&i.rate<=1&&(a.config.random=i.rate,a.isGetSample=!1),a.isWhiteList&&u.length?ye(a)(u.splice(0),function(){}):!a.isWhiteList&&u.length&&(u.length=0),a.config.onWhitelist);"function"==typeof r&&r(s)}catch(e){}},fail:function(){l=!0}})}],E.WHITE_LIST)(null),c=!1)},a.config.uin?50:500)}),a.lifeCycle.on("destroy",function(){u.length=0}),function(e,t){var n;s||null!=(n=null==(n=a.config)?void 0:n.api)&&n.reportRequest?t(e.concat(u.splice(0)).map(function(e){return ge(e),e})):(n=e.filter(function(e){return e.level!==O.INFO&&e.level!==O.API_RESPONSE?(ge(e),!0):(l||(u.push(e),200<=u.length&&(u.length=200)),!1)})).length&&t(n)}),function(e,t){try{var n=JSON.parse(JSON.stringify(e)),o=(g.lifeCycle.emit("beforeReport",n),g.config.beforeReport);(e="function"==typeof o?e.filter(function(e){return!1!==o(e)}):e).length&&t(e)}catch(e){}},ye(this)]),this.eventPipeline=m([Q(this,10),(i=this,function(e){i.sendPipeline([function(e,t){var n=e.map(function(e){return{name:e.name,ext1:e.ext1||i.config.ext1||"",ext2:e.ext2||i.config.ext2||"",ext3:e.ext3||i.config.ext3||""}});t({url:i.config.eventUrl+"?payload="+encodeURIComponent(JSON.stringify(n)),type:E.EVENT,log:e})}],E.EVENT)(e)})]),this.timeMap={},this.failRequestCount=0,this.customTimePipeline=m([Q(this,10),(o=this,function(e){return o.sendPipeline([function(e,t){t({url:o.config.customTimeUrl+"?payload="+encodeURIComponent(JSON.stringify({custom:e})),type:E.CUSTOM,log:e})}],E.CUSTOM)(e)})]),this.config=(t=this.config,void 0===(e=e.hostUrl)&&(e="https://aegis.qq.com"),t.url=t.url||e+"/collect",t.offlineUrl=t.offlineUrl||e+"/offline",t.whiteListUrl=t.whiteListUrl||e+"/collect/whitelist",t.pvUrl=t.pvUrl||e+"/collect/pv",t.eventUrl=t.eventUrl||e+"/collect/events",t.speedUrl=t.speedUrl||e+"/speed",t.customTimeUrl=t.customTimeUrl||e+"/speed/custom",t.performanceUrl=t.performanceUrl||e+"/speed/performance",t.webVitalsUrl=t.webVitalsUrl||e+"/speed/webvitals",t.setDataReportUrl=t.SetDataReportUrl||e+"/speed/miniProgramData",t),w.instances.push(this)}new o({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("AEGIS_ID");t||(t=Z(),window.localStorage.setItem("AEGIS_ID",t)),this.aid=t}catch(e){}},onNewAegis:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}});function Te(){return void 0!==window.performance&&"function"==typeof performance.clearResourceTimings&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now}function be(t,n){function o(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||(t(e),n&&(removeEventListener("visibilitychange",o,!0),removeEventListener("pagehide",o,!0)))}addEventListener("visibilitychange",o,!0),addEventListener("pagehide",o,!0)}function r(e){return-1!==Ce.indexOf(e)}var Ee=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},Se=new o({name:"reportAssetSpeed"}),Re=Se=new o({name:"reportAssetSpeed",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],onNewAegis:function(e){var t=this;Te()&&(this.collectSuccessLog(e),this.collectFailLog(e),performance.onresourcetimingbufferfull=function(){t.collectCur=0,performance.clearResourceTimings()})},publish:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},publishMany:function(e,t){for(var n=t.config,o=0,i=e.length;o<i;o++){var r=e[o];-1===this.ASSETS_INITIATOR_TYPE.indexOf(r.initiatorType)||u(r.name,n.hostUrl)||this.publish(this.generateLog(r,n),t)}},collectSuccessLog:function(n){var e,t,o=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){o.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===Se.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(o.collectEntryType),t=e.slice(o.collectCur);o.collectCur=e.length,o.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===Se.countInstance()&&clearInterval(t)}))},collectFailLog:function(o){function e(e){var t,n;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=r.api)?void 0:e.resourceTypeHandler)?null==(e=r.api)?void 0:e.resourceTypeHandler(t):"",n=performance.getEntriesByType(i.collectEntryType).find(function(e){return e.name===t}),u(t,r.hostUrl))||(n={url:z(t),status:400,duration:Number(((null==n?void 0:n.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:Y(t),urlQuery:P(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0},i.publish(n,o)))}var i=this,r=o.config;window.document.addEventListener("error",e,!0),o.lifeCycle.on("destroy",function(){0===Se.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t){var t="function"==typeof(null==(n=t.api)?void 0:n.resourceTypeHandler)?null==(n=t.api)?void 0:n.resourceTypeHandler(e.name):"",n=e.transferSize;return{url:z(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:Y(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:P(e.name,!0),domainLookup:J(e.domainLookupEnd-e.domainLookupStart),connectTime:J(e.connectEnd-e.connectStart),transferSize:0<n?n:-1}},collectNotReportedLog:function(e){var t,n;Te()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e,!0))},destroy:function(){this.option.publish=function(){}}}),Ce=window.navigator.userAgent.toLowerCase(),a={};function Pe(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}a.macos=function(){return r("mac")},a.ios=function(){return a.iphone()||a.ipod()||a.ipad()},a.iphone=function(){return!a.windows()&&r("iphone")},a.ipod=function(){return r("ipod")},a.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return r("ipad")||e},a.android=function(){return!a.windows()&&r("android")},a.androidPhone=function(){return a.android()&&r("mobile")},a.androidTablet=function(){return a.android()&&!r("mobile")},a.blackberry=function(){return r("blackberry")||r("bb10")},a.blackberryPhone=function(){return a.blackberry()&&!r("tablet")},a.blackberryTablet=function(){return a.blackberry()&&r("tablet")},a.windows=function(){return r("windows")},a.windowsPhone=function(){return a.windows()&&r("phone")},a.windowsTablet=function(){return a.windows()&&r("touch")&&!a.windowsPhone()},a.fxos=function(){return(r("(mobile")||r("(tablet"))&&r(" rv:")},a.fxosPhone=function(){return a.fxos()&&r("mobile")},a.fxosTablet=function(){return a.fxos()&&r("tablet")},a.meego=function(){return r("meego")},a.cordova=function(){return window.cordova&&"file:"===location.protocol},a.nodeWebkit=function(){return"object"==typeof window.process},a.mobile=function(){return a.androidPhone()||a.iphone()||a.ipod()||a.windowsPhone()||a.blackberryPhone()||a.fxosPhone()||a.meego()},a.tablet=function(){return a.ipad()||a.androidTablet()||a.blackberryTablet()||a.windowsTablet()||a.fxosTablet()},a.desktop=function(){return!a.tablet()&&!a.mobile()},a.isIE=function(){return"ActiveXObject"in window};var xe={generateTraceId:Ae(16),generateSpanId:Ae(8)},Oe=Array(32);function Ae(t){return function(){for(var e=0;e<2*t;e++)Oe[e]=Math.floor(16*Math.random())+48,58<=Oe[e]&&(Oe[e]+=39);return String.fromCharCode.apply(null,Oe.slice(0,2*t))}}function Be(e){var t,n="";return n="object"==typeof e&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var o=t[n],i=e[o]||"function"==typeof e.get&&e.get(o);if(i)return[o,i]}return["",""]}(e,Object.keys(Ue)))[0],e=e[1],t)?Ue[t](e):n}function A(o,e,i){return null!=e&&e.length&&"object"==typeof o?e.reduce(function(e,t){var n=o instanceof Headers?o.get(t):o[t];return n?e+(""===e?"\n":"\n\n")+i+" header "+t+": "+n:e},""):""}var Le,Ie,ke,Ne,s,Me,_e,Ue={sw8:function(e){e=e.split("-")[1];return e?atob(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},He=(p.prototype.generate=function(e,t){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8();break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},p.prototype.createTraceparent=function(){var e=xe.generateSpanId();return"00-"+xe.generateTraceId()+"-"+e+"-0"+Number(1).toString(16)},p.prototype.createB3=function(){var e=xe.generateSpanId();return xe.generateTraceId()+"-"+e+"-1"},p.prototype.createSw8=function(){var e=new URL(location.href),t=Z(),n=Z();return"1-"+String(btoa(n))+"-"+String(btoa(t))+"-1-"+String(btoa("aegis"))+"-"+String(btoa("1.37.5"))+"-"+String(btoa(encodeURI(location.pathname)))+"-"+String(btoa(e.host))},p.prototype.createSentryTrace=function(){var e=Pe().substring(16);return Pe()+"-"+e+"-1"},p.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},p.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},p.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},p),De=!1,l=[],Fe=/^\/[^/]/,Ge=!1,f=[],je=(new o({name:"reportApiSpeed"}),new o({name:"reportApiSpeed",override:!1,onNewAegis:function(e){var t,n;this.override||(null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new He(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls)),this.override=!0,this.overrideFetch(e.config,e),this.overrideXhr(e.config,e))},getRequestType:function(e,t,n){void 0===t&&(t="");var o,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===V.indexOf(e)&&(o=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=ae.test(i)||re.some(function(e){return-1!==String(o).indexOf(e)})?"static":"fetch"),e},overrideFetch:function(m,v){var y=this,e=m.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,then:function(d,f,p,h){var e,g;u(p,m.hostUrl)||(e=d.headers?d.headers.get("content-type"):"","fetch"===(g=y.getRequestType(m,e,p))?d.clone().text().then(function(n){var e,o=d.status<=0||400<=d.status,t=(null==(t=m.api)?void 0:t.reqHeaders)||[],i=A(null==h?void 0:h.headers,t,"req"),t=(null==(t=m.api)?void 0:t.resHeaders)||[],r=A(d.headers,t,"res"),a=Be(null==h?void 0:h.headers),t=$(n,m.api,{url:p,ctx:d,payload:null==h?void 0:h.body}),s=t.code,l=t.isErr,t=null==(t=m.api)?void 0:t.apiDetail,c=t?x(null==h?void 0:h.body,null==(e=m.api)?void 0:e.reqParamHandler,{url:p}):"",u=t?x(n,null==(e=m.api)?void 0:e.resBodyHandler,{url:p,ctx:d}):"";setTimeout(function(){var e=y.getPerformanceEntryByUrl(m,{url:p,duration:f,type:g,status:d.status||0,method:(null==h?void 0:h.method)||"get"}),t=(o?"FETCH_ERROR: "+n+" \n\n":"")+"fetch req url: "+p+" \n \nres status: "+(d.status||0)+" \n \nres duration: "+e.duration+"ms \n \nreq method: "+((null==h?void 0:h.method)||"get")+" \n \nres retcode: "+s+"\n \nreq param: "+c+"\n \nres data: "+u+"\n "+i+"\n "+r;e.payload=null==h?void 0:h.body,e.ret=s,e.isErr=+l,y.publishNormalLog({msg:t,level:o?O.AJAX_ERROR:l?O.RET_ERROR:O.API_RESPONSE,code:s,trace:a},v),y.publishSpeed(e,v)},0)}):setTimeout(function(){var e=y.getPerformanceEntryByUrl(m,{url:p,duration:f,type:g,status:d.status||0,method:(null==h?void 0:h.method)||"get"});e.type="static",e.urlQuery=P(p,!0),y.publishSpeed(e,v)},0))},catch:function(t,n,o,i){var r,e,a,s,l;throw u(o,m.hostUrl)||(r=y.getRequestType(m,"",o),e=(null==(e=m.api)?void 0:e.reqHeaders)||[],a=A(null==i?void 0:i.headers,e,"req"),s=Be(null==i?void 0:i.headers),l=null!=(e=m.api)&&e.apiDetail?x(null==i?void 0:i.body,null==(e=m.api)?void 0:e.reqParamHandler,{url:o}):"",setTimeout(function(){var e=y.getPerformanceEntryByUrl(m,{url:o,duration:n,type:r,status:0,method:(null==i?void 0:i.method)||"get"}),e=(y.publishSpeed(e,v),"AJAX_ERROR: "+t+"\n \nreq url: "+o+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+l+"\n "+a);y.publishNormalLog({msg:e,level:O.AJAX_ERROR,code:-400,trace:s},v)},0)),t}},c=(this.hackFetchOptions=e,this.hackFetchOptions);if(f.find(function(e){return e.name===c.name}))throw new Error("name '"+c.name+"' is already in hackFetch option list");f.push(c),!Ge&&window.fetch&&(Ge=!0,Ne=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var t,n,r="string"==typeof e?e:null==e?void 0:e.url,o=(Fe.test(r)&&(r=""+location.origin+r),(c||{}).traceRequestHeader);o&&(n=(i||{}).headers,t=(n=o.generate(r,o=void 0===n?{}:n)||{}).name,n=n.value)&&t&&(i.headers=Object.assign(o,((o={})[t]=n,o)));for(var a=0;a<f.length;a++){var s=f[a];try{"function"==typeof s.beforeFetch&&s.beforeFetch(r,i)}catch(e){}}var l=Date.now();return Ne(e,i).then(function(e){for(var t=e.clone(),n=0;n<f.length;n++){var o=f[n];try{"function"==typeof o.then&&o.then(t,Date.now()-l,r,i)}catch(e){}}return t}).catch(function(e){for(var t=0;t<f.length;t++){var n=f[t];try{"function"==typeof n.catch&&n.catch(e,Date.now()-l,r,i)}catch(e){}}throw e})})},overrideXhr:function(S,R){var t,C=this,e={name:this.name,send:function(b,E){var e,t,n=Date.now();((null==S?void 0:S.api)||{}).injectTraceHeader&&(e=(t=C.traceRequestHeader.generate(b.aegisUrl)||{}).name,t=t.value,e)&&t&&b.setRequestHeader(e,t),b.addEventListener("loadend",function(){var v,y,e,w,T=b.aegisUrl||"";u(T,S.hostUrl)||"abort"===b.failType||(v="",(b.failType||!b.status||400<=b.status)&&(v=b.failType||"failed"),y=Date.now()-n,e=b.getResponseHeader("content-type"),w=C.getRequestType(S,e,T),setTimeout(function(){var o=C.getPerformanceEntryByUrl(S,{url:T,duration:y,type:w,status:b.status,method:b.aegisMethod||"get"});if("fetch"===w){var e=(null==(e=S.api)?void 0:e.reqHeaders)||[],i=A(b.aegisXhrReqHeader,e,"req"),e=(null==(e=S.api)?void 0:e.resHeaders)||[],t=b.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),r=A(t,e,"res"),a=Be(b.aegisXhrReqHeader),e=null==(t=S.api)?void 0:t.apiDetail,s=e?x(E,null==(t=S.api)?void 0:t.reqParamHandler,{url:T}):"",l=e?x(b.response,null==(t=S.api)?void 0:t.resBodyHandler,{url:T}):"";try{var n,c,u,d,f=b.response,p=S.api,h={url:T,ctx:b,payload:E},g=function(e){var t=e.code,e=e.isErr,n=(v?"AJAX_ERROR: request "+v+" \n\n":"")+"fetch req url: "+T+" \n \nres status: "+o.status+"\n \nres duration: "+o.duration+"ms\n \nreq method: "+o.method+"\n \nres retcode: "+t+"\n \nreq param: "+s+"\n \nres data: "+l+"\n "+i+"\n "+r;o.ret=t,o.isErr=+e,o.payload=E,C.publishNormalLog({msg:n,level:v?O.AJAX_ERROR:e?O.RET_ERROR:O.API_RESPONSE,code:t,trace:a},R),C.publishSpeed(o,R)};try{if("function"==typeof(null==p?void 0:p.retCodeHandlerAsync))return void p.retCodeHandlerAsync(f,null==h?void 0:h.url,null==h?void 0:h.ctx,function(e){var t=e.code,e=e.isErr;null!=g&&g({code:void 0===t?"unknown":t,isErr:e})});if("function"==typeof(null==p?void 0:p.retCodeHandler))return void(u=(c=p.retCodeHandler(f,null==h?void 0:h.url,null==h?void 0:h.ctx,null==h?void 0:h.payload)||{}).code,d=c.isErr,null!=g&&g({code:void 0===u?"unknown":u,isErr:d}));if(!(f="string"==typeof f?JSON.parse(f):f))return void(null!=g&&g({code:"unknown",isErr:!1}));"function"==typeof(null==(n=null==p?void 0:p.ret)?void 0:n.join)&&(se=[].concat(p.ret.map(function(e){return e.toLowerCase()})));var m=Object.getOwnPropertyNames(f).filter(function(e){return-1!==se.indexOf(e.toLowerCase())});if(m.length)return void("未知"!==(u=f[m[0]])&&""!==u||(u="unknown"),null!=g&&g({code:""+u,isErr:0!==u&&"0"!==u&&"unknown"!==u}));null!=g&&g({code:"unknown",isErr:!1})}catch(f){null!=g&&g({code:"unknown",isErr:!1})}}catch(e){o.ret="unknown",C.publishSpeed(o,R)}}else o.type="static",o.urlQuery=P(T,!0),C.publishSpeed(o,R)},0))}),["abort","error","timeout"].map(function(e){b.addEventListener(e,function(){b.failType=e})})}};this.hackXHROptions=e,t=this.hackXHROptions,l.find(function(e){return e.name===t.name})||(l.push(t),!De&&window.XMLHttpRequest&&(Le=window.XMLHttpRequest.prototype.send,Ie=window.XMLHttpRequest.prototype.open,ke=window.XMLHttpRequest.prototype.setRequestHeader,De=!0,window.XMLHttpRequest.prototype.open=function(){this.aegisMethod=arguments[0];var e=arguments[1];if(Fe.test(e)&&(e=""+location.origin+e),this.aegisUrl=e,this.aegisXhrStartTime=Date.now(),this.sendByAegis)a.isIE()||(this.timeout=5e3);else for(var t=0;t<l.length;t++){var n=l[t];try{"function"==typeof n.open&&n.open(this)}catch(e){}}return Ie.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t=arguments[0],n=arguments[1];if(this.aegisXhrReqHeader=null!=(e=this.aegisXhrReqHeader)?e:{},!(-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.aegisXhrReqHeader[t]||(arguments[1]=n),this.aegisXhrReqHeader[t])))return this.aegisXhrReqHeader[t]=arguments[1],ke.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){if(!this.sendByAegis)for(var e=0;e<l.length;e++){var t=l[e];try{"function"==typeof t.send&&t.send(this,arguments[0])}catch(e){}}return Le.apply(this,arguments)}))},getPerformanceEntryByUrl:function(e,t){if(null!=(e=e.api)&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:Y(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:J(e.domainLookupEnd-e.domainLookupStart),connectTime:J(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:Y(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:n.number,connectTime:n.number}},publishSpeed:function(n){var o=this;this.$walk(function(e){var t=o.$getConfig(e);"fetch"===n.type&&t&&"function"==typeof t.urlHandler?e.speedLogPipeline(b(b({},n),{url:P(t.urlHandler(n.url,n.payload))})):(n.url=P(n.url),e.speedLogPipeline(n))})},publishNormalLog:function(t){this.$walk(function(e){e.normalLogPipeline(t)})},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(t=this.option.hackXHROptions,-1!==(e=l.findIndex(function(e){return e.name===t.name})))&&l.splice(e,1),this.option.hackFetchOptions&&(n=this.option.hackFetchOptions,-1!==(e=f.findIndex(function(e){return e.name===n.name})))&&f.splice(e,1),this.option.override=!1}})),qe={},We=new o({name:"reportBridgeSpeed",override:!1,onNewAegis:function(e){this.override||(this.override=!0,this.overrideBridge(e))},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(l){var c=this,u=l.config;u.reportBridgeSpeed&&u.h5Bridge&&u.h5BridgeFunc.length&&u.h5BridgeFunc.forEach(function(e){var s=u.h5Bridge[e];qe[e]=s,u.h5Bridge[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var o=e[0],i=e[1],n=e[2],r=e[3],a=Date.now();s(o,i,n,function(e){var t=$(e,u.api),n=t.code,t=t.isErr,n={url:o+"-"+i,name:o+"-"+i,duration:Date.now()-a,type:"bridge",ret:n,isErr:+t};c.publishSpeed(n,l),r(e)})}})},unHackBridge:function(t){Object.keys(qe).forEach(function(e){qe[e]&&(t.config.h5Bridge[e]=qe[e])}),qe={}},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}});function p(e,t,n){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n}(C=s=s||{})[C.unknown=100]="unknown",C[C.wifi=1]="wifi",C[C.net2g=2]="net2g",C[C.net3g=3]="net3g",C[C.net4g=4]="net4g",C[C.net5g=5]="net5g",C[C.net6g=6]="net6g",(C=Me=Me||{})[C.android=1]="android",C[C.ios=2]="ios",C[C.windows=3]="windows",C[C.macos=4]="macos",C[C.linux=5]="linux",C[C.other=100]="other",(C=_e=_e||{})[C.unknown=100]="unknown",C[C.normal=0]="normal",C[C.weak=1]="weak",C[C.disconnected=2]="disconnected";function h(e,t,n,o){return void 0===n&&(n=15e3),void 0===o&&(o=0),(t=void 0===t?0:t)<=e&&e<=n?e:o}var g,T,Ve,Xe,Ke,R,Je,ze,Ye,C=new o({name:"device",onNewAegis:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",s.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?Me[e]:Me.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:$e)(function(e){s[e]||(e=s.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,o=t.config;o&&null!=(e="function"==typeof o.getNetworkStatus?o.getNetworkStatus:e)&&e(function(e){void 0===_e[e]&&(e=_e.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}}),$e=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||"unknown",0<=(n=String(n).toLowerCase()).indexOf("4g")?s.net4g:0<=n.indexOf("wifi")?s.wifi:0<=n.indexOf("5g")?s.net5g:0<=n.indexOf("6g")?s.net6g:0<=n.indexOf("3g")?s.net3g:0<=n.indexOf("2g")?s.net2g:s.unknown))},Ze=window.WebSocket,B=[],Qe={construct:function(e,t){var a=new e(t[0],t[1]);return a.originSend=a.send,a.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=B&&B.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(a,"send",{get:function(){return function(e){null!=(t=a.originSend)&&t.call(a,e);var t=a.readyState,e=WebSocket.OPEN,n=WebSocket.CLOSED,o=WebSocket.CONNECTING,i=WebSocket.CLOSING;if(t!==e){var r={readyState:t,connectUrl:a.url};switch(t){case n:B.forEach(function(e){e=e.sendErr;null!=e&&e(b({msg:"消息发送失败,连接已关闭!"},r))});break;case o:B.forEach(function(e){(0,e.sendErr)(b({msg:"消息发送失败,正在连接中!"},r))});break;case i:B.forEach(function(e){(0,e.sendErr)(b({msg:"消息发送失败,连接正在关闭!"},r))})}}}}}),a}},et=new o({name:"onError"}),tt=et=new o({name:"onError",onNewAegis:function(e){this.startListen(e)},startListen:function(i){function e(e){(e=e&&S(e.reason))&&s.publishErrorLog({msg:"PROMISE_ERROR: "+e,level:O.PROMISE_ERROR},i)}function t(e){var t;if(e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement)){var n=e.src||e.href||"",e=e.tagName,e=void 0===e?"script":e;if(!(u(t=n,i.config.hostUrl)||-1<window.location.href.indexOf(t))){var o={msg:e+" load fail: "+n,level:O.INFO};if(/\.js$/.test(n))o.level=O.SCRIPT_ERROR;else if(/\.css$/.test(n))o.level=O.CSS_ERROR;else switch(e.toLowerCase()){case"script":o.level=O.SCRIPT_ERROR;break;case"link":o.level=O.CSS_ERROR;break;case"img":o.level=O.IMAGE_ERROR;break;case"audio":case"video":o.level=O.MEDIA_ERROR;break;default:return}s.publishErrorLog(o,i)}}}var n,o,r,a,s=this,l=window.onerror;window.onerror=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,o=S(e[0]);"string"!=typeof(n=o)||!n||q.some(function(e){return-1<n.indexOf(e)})||j.some(function(e){return-1<n.indexOf(e)})||s.publishErrorLog({msg:(o||"")+" @ ("+(S(e[1])||"")+":"+(e[2]||0)+":"+(e[3]||0)+")\n \n"+S(e[4]||""),level:O.ERROR},i),null!=l&&l.call.apply(l,c([window],e))},window.addEventListener("unhandledrejection",e);window.document.addEventListener("error",t,!0),i.lifeCycle.on("destroy",function(){0===et.countInstance()&&(window.document.removeEventListener("unhandledrejection",e),window.document.removeEventListener("error",t,!0))}),i.config.websocketHack&&(n={key:i.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=s.publishWsErrorLog)&&t.call(s,e,i)},sendErr:function(e){var t;null!=(t=s.publishWsErrorLog)&&t.call(s,e,i)}},this.hackWebsocketConfig=n,n=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(o=window.WebSocket,window&&!o.isHack&&(r=new Proxy(WebSocket,Qe),o.isHack=!0,window.WebSocket=r),a=n,B.find(function(e){return e.key===a.key})||a&&B.push(a))},publishErrorLog:function(t,n){this.$walk(function(e){e===n&&e.normalLogPipeline(t)})},publishWsErrorLog:function(e,t){var n=e.connectUrl,o=e.msg,e=e.readyState;this.publishErrorLog({msg:"WEBSOCKET_ERROR: \n connect: "+n+"\n readyState: "+e+"\n msg: "+o,level:O.WEBSOCKET_ERROR},t)},destroy:function(){var t,e;this.option.publishErrorLog=function(){},this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=Ze,-1!==(e=B.findIndex(function(e){return e.key===t.key})))&&B.splice(e,1)}}),nt=(new o({name:"pagePerformance"}),3),ot=new o({name:"pagePerformance",onNewAegis:function(e){Te()&&(g?this.publish(g,e):this.startCalcPerformance(e))},publish:function(e,t){var s=this;this.$walk(function(a){a===t&&a.sendPipeline([function(e,t){var n,o=[];for(n in e)o.push(n+"="+e[n]);var i,r=s.$getConfig(a);if(r)return i=-1===(null==(i=a.config.performanceUrl)?void 0:i.indexOf("?"))?"?":"&","function"==typeof r.urlHandler?t({url:a.config.performanceUrl+i+o.join("&")+"&from="+(encodeURIComponent(r.urlHandler())||window.location.href),beanFilter:["from"],type:E.PERFORMANCE,log:e}):t({url:a.config.performanceUrl+i+o.join("&"),type:E.PERFORMANCE,log:e})}],E.PERFORMANCE)(e)})},startCalcPerformance:function(n){var o=this;try{this.getFirstScreenTiming(n,function(e){var t=performance.timing;t&&(g={dnsLookup:h(t.domainLookupEnd-t.domainLookupStart),tcp:h(t.connectEnd-t.connectStart),ssl:h(0===t.secureConnectionStart?0:t.requestStart-t.secureConnectionStart),ttfb:h(t.responseStart-t.requestStart),contentDownload:h(t.responseEnd-t.responseStart),domParse:h(t.domInteractive-t.domLoading,0,15e3,1070),resourceDownload:h(t.loadEventStart-t.domInteractive,0,15e3,1070),firstScreenTiming:h(Math.floor(e),0,15e3,15e3)},(t=n.config).extraPerformanceData&&"{}"!==JSON.stringify(t.extraPerformanceData)&&(t=(e=t.extraPerformanceData).engineInit,e=e.bundleLoad,g=b(b({},g),{engineInit:h(t,0,1e4),bundleLoad:h(e,0,1e4)})),o.publish(g,n))})}catch(n){}},getFirstScreenTiming:function(s,l){s.lifeCycle.on("destroy",function(){h&&clearTimeout(h)});var c=this,n=["script","style","link","br"],u=[],d={},f=new MutationObserver(function(e){var t={roots:[],rootsDomNum:[],time:performance.now()};e.forEach(function(e){e&&e.addedNodes&&e.addedNodes.forEach&&e.addedNodes.forEach(function(e){1===e.nodeType&&e.hasAttribute("AEGIS-FIRST-SCREEN-TIMING")?(Object.prototype.hasOwnProperty.apply(d,[t.time])||(d[t.time]=[]),d[t.time].push(e)):1!==e.nodeType||-1!==n.indexOf(e.nodeName.toLocaleLowerCase())||c.isEleInArray(e,t.roots)||e.hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING")||(t.roots.push(e),t.rootsDomNum.push(c.walkAndCount(e)||0))})}),t.roots.length&&u.push(t)}),p=(f.observe(document,{childList:!0,subtree:!0}),function(o){(o=void 0===o?0:o)||(i=0,(e=Object.keys(d)).length?(o=Math.max.apply(null,e),("object"!=typeof(null==(e=s.config)?void 0:e.pagePerformance)||null!=(e=s.config.pagePerformance)&&e.firstScreenInfo)&&(s.firstScreenInfo={element:null==(e=d[o])?void 0:e[0],timing:o,markDoms:d})):u.forEach(function(e){for(var t,n=0;n<e.roots.length;n++)e.rootsDomNum[n]>i&&c.isInFirstScreen(e.roots[n])&&(i=e.rootsDomNum[n],o=e.time,"object"!=typeof(null==(t=s.config)?void 0:t.pagePerformance)||null!=(t=s.config.pagePerformance)&&t.firstScreenInfo)&&(s.firstScreenInfo={element:e.roots[n],timing:o})}),u.length=0,Object.keys(d).forEach(function(e){d[e]=d[e].map(function(e){var t={tagName:e.tagName},n=e.attributes;if(!n)return e;for(var o=0;o<n.length;o++){var i=n[o];i.name&&(t[i.name]=e.getAttribute(i.name))}return t})}));var i,e=performance.timing,t=e.domInteractive-e.domLoading,e=e.loadEventStart-e.domInteractive,n=o;h=null;for(var r=0,a=[t,e,n];r<a.length;r++)if(a[r]<=0&&0<nt){h=setTimeout(function(){return p(n)},3e3);break}h?--nt:(f.disconnect(),null!=l&&l(o))}),h=setTimeout(function(){return p()},3e3)},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t,n;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,n=window.innerWidth,0<=e.left)&&e.left<n&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var o=0;o<n.length;o++)t+=this.walkAndCount(n[o])}return t}});function it(){Ke=[],Ve=-1,T=null,st(addEventListener)}function rt(e,t){T||(T=t,Ve=e,Xe=new Date,st(removeEventListener),at())}function at(){var t;0<=Ve&&Ve<Xe-Je&&(t={entryType:"first-input",name:T.type,target:T.target,cancelable:T.cancelable,startTime:T.timeStamp,processingStart:T.timeStamp+Ve},Ke.forEach(function(e){e(t)}),Ke=[])}function st(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,ze,R)})}R={passive:!0,capture:!0},Je=new Date,ze=function(e){var t,n,o,i;function r(){rt(n,o),i()}function a(){i()}e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,o=e,i=function(){removeEventListener("pointerup",r,R),removeEventListener("pointercancel",a,R)},addEventListener("pointerup",r,R),addEventListener("pointercancel",a,R)):rt(t,e))},Ye="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function e(t){"hidden"===document.visibilityState&&(Ye=t.timeStamp,removeEventListener("visibilitychange",e,!0))},!0),it(),self.webVitals={firstInputPolyfill:function(e){Ke.push(e),at()},resetFirstInputPolyfill:it,get firstHiddenTime(){return Ye}};function L(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}}function lt(e,t){try{var n;if(PerformanceObserver.supportedEntryTypes.includes(e))if("first-input"!==e||"PerformanceEventTiming"in self)return(n=new PerformanceObserver(function(e){return e.getEntries().map(t)})).observe({type:e,buffered:!0}),n}catch(e){}}function ct(t){addEventListener("pageshow",function(e){e.persisted&&t(e)},!0)}function I(e,t,n){var o;return function(){0<=t.value&&(n||k.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(o||0),t.delta||void 0===o)&&(o=t.value,e(t))}}function ut(){mt(function(e){e=e.timeStamp;vt=e},!0)}function dt(){return vt<0&&((vt=self.webVitals.firstHiddenTime)===1/0&&ut(),ct(function(){setTimeout(function(){vt="hidden"===document.visibilityState?0:1/0,ut()},0)})),{get timeStamp(){return vt}}}function ft(e){var t=e.name;0<(e=e.value)&&(yt[t]=e)}function pt(e,h){function g(e){T=e}function m(e){y=y.concat(e)}function v(e,t){w={conds:e=void 0===e?{}:e,params:t=void 0===t?{}:t}}var y=[],w=null,T=null;N.useAsyncPlugin(e,{exportsConstructor:"Flog",onAegisInit:function(e){e.lifeCycle.on("beforeWrite",m),e.lifeCycle.on("uploadLogs",v),e.lifeCycle.on("onConfigChange",g)},onAegisInitAndPluginLoaded:function(o,e){var t,n,i,r,a,s,l=h.dbConfig,l=void 0===l?{}:l,c=h.url,c=void 0===c?N.urls.aegisCollect:c,u=h.offlineLogExp,u=void 0===u?3:u,d=h.id,f=h.uin,c=(null!=(t=o.lifeCycle)&&t.remove("beforeWrite",m),null!=(t=o.lifeCycle)&&t.remove("uploadLogs",v),null!=(t=o.lifeCycle)&&t.remove("onConfigChange",g),Object.assign({lookupUrl:c+"/offlineAuto?id="+d,preservedDay:u,id:d,uin:f,aid:(null==(t=o.bean)?void 0:t.aid)||"",beforeRequest:o.config.beforeRequest,afterRequest:o.config.afterRequest},l,{sessionId:N.sessionID}));try{var p=new e(c);y.forEach(function(e){p.add(b(b({},e),{level:e.level===O.INFO_ALL?O.INFO:e.level}))}),null!=(n=o.lifeCycle)&&n.on("beforeWrite",function(e){(e=void 0===e?[]:e).forEach(function(e){p.add(b(b({},e),{level:e.level===O.INFO_ALL?O.INFO:e.level}))})}),null!=(i=o.lifeCycle)&&i.on("uploadLogs",function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),p.uploadLogs(Object.assign({id:h.id,uin:h.uin,aid:null==(n=o.bean)?void 0:n.aid},e),t)}),null!=(r=o.lifeCycle)&&r.on("onConfigChange",function(e){p.setConfig(e)}),null!=(a=o.lifeCycle)&&a.on("destroy",function(){0===bt.countInstance()&&(y.length=0,"function"==typeof((w=null)==p?void 0:p.destroy))&&p.destroy()}),p.on("PERREVENT",function(e){o.sendPipeline([function(e,t){n={msg:S(e),level:O.INFO};var n=(n=Array.isArray(n)?n:[n]).map(function(t,n){return Object.getOwnPropertyNames(t).map(function(e){return F(e)+"["+n+"]="+(void 0===t[e]?"":F(t[e]))}).join("&")}).join("&")+(n.length?"&count="+n.length:"");t({type:E.OFFLINE,data:n,contentType:"application/x-www-form-urlencoded",method:"post",addBean:!1,url:h.url+"?id=893&sessionId="+N.sessionID+"&uin="+h.uin+"&from="+h.id+"&count=1&version=1.37.5",log:e})}],E.OFFLINE)(e)}),T&&(p.setConfig(T),T=null),w&&(null!=(s=o.lifeCycle)&&s.emit("uploadLogs",w.conds,w.params),w=null),o.flog=p}catch(o){console.log(o)}}})}var ht,gt,mt=function(t,n){function o(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||(t(e),n&&(removeEventListener("visibilitychange",o,!0),removeEventListener("pagehide",o,!0)))}addEventListener("visibilitychange",o,!0),addEventListener("pagehide",o,!0)},k=new("function"==typeof WeakSet?WeakSet:Set),vt=-1,yt=(new o({name:"webVitals"}),{FCP:-1,LCP:-1,FID:-1,CLS:-1}),wt=new o({name:"webVitals",onNewAegis:function(e){if(Te()&&"function"==typeof window.PerformanceObserver&&"function"==typeof performance.getEntriesByName)try{v=ft,w=dt(),T=L("FCP"),b=performance.getEntriesByName("first-contentful-paint")[0],E=b?null:lt("paint",C),(b||E)&&(y=I(v,T,void 0),b&&C(b),ct(function(e){T=L("FCP"),y=I(v,T,void 0),requestAnimationFrame(function(){requestAnimationFrame(function(){T.value=performance.now()-e.timeStamp,k.add(T),y()})})})),d=ft,h=dt(),g=L("LCP"),(m=lt("largest-contentful-paint",R))&&(f=I(d,g,void 0),p=function(){k.has(g)||(m.takeRecords().map(R),m.disconnect(),k.add(g),f())},["keydown","click"].forEach(function(e){addEventListener(e,p,{once:!0,capture:!0})}),mt(p,!0),ct(function(e){g=L("LCP"),f=I(d,g,void 0),requestAnimationFrame(function(){requestAnimationFrame(function(){g.value=performance.now()-e.timeStamp,k.add(g),f()})})})),a=ft,s=dt(),l=L("FID"),c=lt("first-input",S),u=I(a,l,void 0),c&&mt(function(){c.takeRecords().map(S),c.disconnect()},!0),c||window.webVitals.firstInputPolyfill(S),ct(function(){l=L("FID"),u=I(a,l,void 0),window.webVitals.resetFirstInputPolyfill(),window.webVitals.firstInputPolyfill(S)}),n=ft,i=L("CLS",0),(r=lt("layout-shift",t))&&(o=I(n,i,void 0),mt(function(){r.takeRecords().map(t),o()}),ct(function(){i=L("CLS",0),o=I(n,i,void 0)})),be(this.publish.bind(this,e),!0)}catch(e){}function t(e){e.hadRecentInput||(i.value+=e.value,i.entries.push(e),o())}var n,o,i,r,a,s,l,c,u,d,f,p,h,g,m,v,y,w,T,b,E;function S(e){e.startTime<s.timeStamp&&(l.value=e.processingStart-e.startTime,l.entries.push(e),k.add(l),u())}function R(e){var t=e.startTime;t<h.timeStamp&&(g.value=t,g.entries.push(e)),f()}function C(e){"first-contentful-paint"===e.name&&(E&&E.disconnect(),e.startTime<w.timeStamp)&&(T.value=e.startTime,T.entries.push(e),k.add(T),y())}},publish:function(t){this.$walk(function(r){var e;r===t&&null!=(e=r.sendPipeline)&&e.call(r,[function(e,t){var n,o=[];for(n in e)o.push(n+"="+e[n]);var i=-1===(null==(i=null==(i=r.config)?void 0:i.performanceUrl)?void 0:i.indexOf("?"))?"?":"&";t({url:r.config.webVitalsUrl+i+o.join("&"),type:E.VITALS,log:e,sendBeacon:!0})}],E.VITALS)(yt)})},destroy:function(){this.option.publish=function(){}}}),Tt=0,N=(D(gt=M,t=ht=t),gt.prototype=null===t?Object.create(t):(Rt.prototype=t.prototype,new Rt),M.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},M.prototype.getCurrentPageUrl=function(){var e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler():e).slice(0,2048);return encodeURIComponent(e)},M.prototype.ready=function(){function r(){var e,n,o,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,o=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==o?void 0:o.apply(n,e)}finally{r()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{r()}}))}var t=this;r(),this.isReportReady=!0},M.prototype.request=function(e,t,n){this.config.reportImmediately||this.isReportReady?this.$request(e,t,n):this.reportRequestQueue.push({options:e,success:t,fail:n})},M.prototype.$request=function(e,t,n){var o,i,r,a;if(e&&"string"==typeof e.url&&""!==e.url&&this.bean.id)return a=e.url,!1!==e.addBean&&(a=a+(-1===a.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),e.url=a,a=e.method||"get",(e=(i=this.config.onBeforeRequest)?i(e,this):e)?e.url?void((null!=e&&e.sendBeacon||this.sendNow)&&"function"==typeof(null===navigator||void 0===navigator?void 0:navigator.sendBeacon)?navigator.sendBeacon(e.url,e.data):((o=new XMLHttpRequest).sendByAegis=!0,o.addEventListener("readystatechange",function(){4===o.readyState&&(400<=o.status||0===o.status?null!=n&&n(o.response):null!=t&&t(o.response))}),"get"===a.toLocaleLowerCase()?(o.open("get",(i=e.url,r=e.data,"string"!=typeof i?"":"object"==typeof r&&r?(a=Object.getOwnPropertyNames(r).map(function(e){var t=r[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),i+(-1===i.indexOf("?")?"?":"&")+a):i)),o.send()):(o.open("post",e.url),e.contentType&&o.setRequestHeader("Content-Type",e.contentType),"string"==typeof e.data&&(e.data=e.data.replace(/eval/gi,"evaI")),o.send(e.data)))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},M.useAsyncPlugin=function(a,e){var t=(e=void 0===e?{}:e).exportsConstructor,s=void 0===t?"aegis-plugin-"+Tt:t,t=e.onAegisInit,l=void 0===t?function(){}:t,t=e.onAegisInitAndPluginLoaded,c=void 0===t?function(){}:t;if(Tt+=1,"string"!=typeof a)throw new TypeError("useAsyncPlugin first param must be string");if("function"!=typeof l||"function"!=typeof c)throw new TypeError("onAegisInit and onAegisInitAndPluginLoaded must be function");this.use(new o({name:"asyncPlugin",onNewAegis:function(t){try{l(t),M.asyncPlugin[a]?c(t,window[M.asyncPlugin[a]]):(e=a,n=s,o=function(e){e||(M.asyncPlugin[a]=s,e=window[s],c(t,e))},i=document.createElement("script"),r=document.head,"function"==typeof n&&(o=n,n=""),i.src=e,i.setAttribute("name",n),i.name=n,i.setAttribute("crossorigin","anonymous"),i.crossorigin="anonymous",i.defer=!0,i.hasLoaded=!1,i.onreadystatechange=function(){i.hasLoaded||i.readyState&&"loaded"!==i.readyState&&"complete"!==i.readyState||(i.hasLoaded=!0,"function"==typeof o&&o(!1),setTimeout(function(){r.contains(i)&&r.removeChild(i)}))},i.onload=i.onreadystatechange,i.onerror=function(){"function"==typeof o&&o(!0),setTimeout(function(){r.contains(i)&&r.removeChild(i)})},"complete"===document.readyState?r.appendChild(i):window.addEventListener("load",function(){r.appendChild(i)}))}catch(e){console.log("error on below is caused by "+a+" "),console.error(e)}var e,n,o,i,r}}))},M.prototype.publishPluginsLogs=function(){var e=M.installedPlugins.find(function(e){return"reportAssetSpeed"===e.name});null!=e&&e.option.collectNotReportedLog(this)},M.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},M.sessionID="session-"+Date.now(),M.asyncPlugin={},M.urls={aegisCollect:"https://aegis.qq.com/collect",flog:"https://cdn-go.cn/vasdev/web_webpersistance_v2/v1.8.2/flog.core.min.js"},M),bt=new o({name:"offlineLog"}),t=bt=new o({name:"offlineLog",onNewAegis:function(e){pt(N.urls.flog,e.config)}}),Et=(new o({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),St=new o({name:"spa",originFireUrl:"",onNewAegis:function(t){var n=this;history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),t.config.spa&&this.sendPv(t),Et.forEach(function(e){return window.addEventListener(e,function(){return n.sendPv.call(n,t)})})},wr:function(n){var o=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof o&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=o.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},sendPv:function(i){var r=this;setTimeout(function(){var o=location.href,t=location.pathname+location.hash+i.config.id;r.$walk(function(e){var n;e===i&&(n=e.config.pvUrl)&&t&&t!==r.originFireUrl&&(e.sendPipeline([function(e,t){t({url:n+"?from="+encodeURIComponent(o),beanFilter:["from"],type:E.PV})}],E.PV)(null),r.originFireUrl=t)})},0)},destroy:function(){this.option.sendPv=function(){}}});function M(e){var t,n,o,a,s=ht.call(this,e)||this;s.sendNow=!1,s.isReportReady=!1,s.reportRequestQueue=[],s.speedLogPipeline=m([Q(s),(a=s.config,function(e,t){var n,o,i,r="number"==typeof a.repeat?a.repeat:60;!a.speedSample||r<=0?t(e):(n=(null==a?void 0:a.id)||"0",o=y[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!o[e.url]||o[e.url]<r;return t?(o[e.url]=1+~~o[e.url],y[n]=o):v[n]||me(n),t})).length&&t(i):!o[e.url]||o[e.url]<r?(o[e.url]=1+~~o[e.url],y[n]=o,t(e)):v[n]||me(n))}),(o=s,function(t,n){$e(function(e){o.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=s.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,o=s.config.beforeReportSpeed;if((e="function"==typeof o?e.filter(function(e){return!1!==o(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return void 0!==e.payload&&delete e.payload,e}))},function(e){return s.sendPipeline([function(e,t){var n,o,i,r;t({type:E.SPEED,url:""+s.config.speedUrl,method:"post",data:(t=e,n=b(b({},s.bean),{from:s.getCurrentPageUrl()}),i={fetch:[],static:[],bridge:[]},r=new FormData,Array.isArray(t)?t.forEach(function(e){var t=Ee(e);i[e.type].push(t)}):(o=Ee(t),i[t.type].push(o)),r.append("payload",ce(b({duration:i},n))),r),log:e})}],E.SPEED)(e)}]),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(e.uin=e.uin||(null!=(t=document.cookie.match(/\buin=\D+(\d*)/))?t:[])[1]||(null!=(n=document.cookie.match(/\bilive_uin=\D*(\d+)/))?n:[])[1]||""),s.init(e),s.extendBean("sessionId",M.sessionID),s.extendBean("from",s.getCurrentPageUrl()),"undefined"!=typeof document&&s.extendBean("referer",encodeURIComponent(document.referrer||"")),e.ext1&&s.extendBean("ext1",encodeURIComponent(e.ext1)),e.ext2&&s.extendBean("ext2",encodeURIComponent(e.ext2)),e.ext3&&s.extendBean("ext3",encodeURIComponent(e.ext3))}catch(e){console.warn(e),console.log("%cThe above error occurred in the process of initializing Aegis, which will affect your normal use of Aegis.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),s.sendSDKError(e)}return s}function Rt(){this.constructor=gt}new o({name:"ie"}),new o({name:"onClose"});function Ct(e){for(var t=3&e.length,n=e.length-t,o=1,i=3432918353,r=461845907,a=0;a<n;){var s=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24;++a;o=27492+(65535&(s=5*(65535&(o=(o^=(65535&(s=(s=(65535&s)*i+(((s>>>16)*i&65535)<<16)&4294967295)<<15|s>>>17))*r+(((s>>>16)*r&65535)<<16)&4294967295)<<13|o>>>19))+((5*(o>>>16)&65535)<<16)&4294967295))+((58964+(s>>>16)&65535)<<16)}var l=0;switch(t){case 3:l^=(255&e.charCodeAt(a+2))<<16;case 2:l^=(255&e.charCodeAt(a+1))<<8;case 1:o^=l=(65535&(l=(l=(65535&(l^=255&e.charCodeAt(a)))*i+(((l>>>16)*i&65535)<<16)&4294967295)<<15|l>>>17))*r+(((l>>>16)*r&65535)<<16)&4294967295}o=2246822507*(65535&(o=(o^=e.length)^o>>>16))+((2246822507*(o>>>16)&65535)<<16)&4294967295,o=3266489909*(65535&(o^=o>>>13))+((3266489909*(o>>>16)&65535)<<16)&4294967295;for(var c=(o^=o>>>16)>>>0,u=(c%2).toString();1<c;)u=(c=parseInt((c/2).toString(),10))%2+u;for(;u.length<32;)u="0"+u;return u}function Pt(){var e,l,i,t=document.createElement("canvas");return((e=t.getContext("2d"))?(e.font="14px 'Arial'",e.textBaseline="alphabetic",e.fillStyle="#f60",e.fillRect(125,1,62,20),e.fillStyle="#069",e.fillText("aegis,sdk <canvas> 1.0",2,15),e.fillStyle="rgba(102, 204, 0, 0.7)",e.fillText("aegis,sdk <canvas> 1.0",4,17),t.toDataURL("image/jpeg")):"")+(l=["monospace","sans-serif","serif"],i=["default","sans-serif","serif","monospace","Apple LiSung","Apple SD Gothic Neo","Apple Symbols","Baoli SC, Baoli TC","Baskerville","Beirut","GungSeo","Gurmukhi MN","Gurmukhi MT","Hannotate SC, Hannotate TC","HanziPen SC, HanziPen TC","HeadlineA","Hei","LiSong Pro","Libian SC, Libian TC","LingWai SC, LingWai TC","Lucida Grande","Luminari","Nanum Brush Script","Nanum Gothic, NanumGothic","Nanum Myeongjo, NanumMyeongjo","Nanum Pen Script","NanumGothic ExtraBold, NanumGothicExtraBold","New Peninim MT","Noto Serif Kannada","Noto Serif Myanmar","Optima","PilGi","Plantagenet Cherokee","Raanana","STFangSong, STFangsong","STHeiti","STIXGeneral, STIXGeneral-Regular","Tsukushi B Round Gothic, Tsukushi B Round Gothic Regular","Tsukushi B Round Gothic Bold","Verdana","Waseem","Xingkai SC, Xingkai TC","YuGothic, YuGothic Medium","YuGothic Bold","Yuanti SC, Yuanti TC","Yuppy SC, Yuppy TC","Zapf Dingbats","Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3","Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"],function(){for(var e=function(){var e,i=document.getElementsByTagName("head")[0],r=document.createElement("span"),a=(r.style.fontSize="72px",r.innerHTML="mmmmmmmmmmlli",{}),s={};for(e in l)r.style.fontFamily=l[e],i.appendChild(r),a[l[e]]=r.offsetWidth,s[l[e]]=r.offsetHeight,i.removeChild(r);return{detect:function(e){var t,n=!1;for(t in l){r.style.fontFamily=e+","+l[t],i.appendChild(r);var o=r.offsetWidth!==a[l[t]]||r.offsetHeight!==s[l[t]];i.removeChild(r),n=n||o}return n}}}(),t=i,n="",o=0;o<t.length;o++)n+=e.detect(t[o])?"1":"0";return n}())+function(){var e=document.createElement("canvas"),s=(e.width=256,e.height=128,e.getContext("webgl2")||e.getContext("experimental-webgl2")||e.getContext("webgl")||e.getContext("experimental-webgl")||e.getContext("moz-webgl")),t=function(){var e="";try{var t=s.createBuffer(),n=(s.bindBuffer(s.ARRAY_BUFFER,t),new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0])),o=(s.bufferData(s.ARRAY_BUFFER,n,s.STATIC_DRAW),t.itemSize=3,t.numItems=3,s.createProgram()),i=s.createShader(s.VERTEX_SHADER),r=(s.shaderSource(i,"attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}"),s.compileShader(i),s.createShader(s.FRAGMENT_SHADER)),a=(s.shaderSource(r,"precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}"),s.compileShader(r),s.attachShader(o,i),s.attachShader(o,r),s.linkProgram(o),s.useProgram(o),o.vertexPosAttrib=s.getAttribLocation(o,"attrVertex"),o.offsetUniform=s.getUniformLocation(o,"uniformOffset"),s.enableVertexAttribArray(o.vertexPosArray),s.vertexAttribPointer(o.vertexPosAttrib,t.itemSize,s.FLOAT,!1,0,0),s.uniform2f(o.offsetUniform,1,1),s.drawArrays(s.TRIANGLE_STRIP,0,t.numItems),new Uint8Array(131072));s.readPixels(0,0,256,128,s.RGBA,s.UNSIGNED_BYTE,a),e=JSON.stringify(a).replace(/,?"[0-9]+":/g,"")}catch(e){console.warn("fAid error: getwebGlHash-getWebglImageHash",e)}return e}(),n=function(){var e="";try{var t=null==s?void 0:s.getExtension("WEBGL_debug_renderer_info"),e=(null==s?void 0:s.getParameter(t.UNMASKED_VENDOR_WEBGL))+(null==s?void 0:s.getParameter(t.UNMASKED_RENDERER_WEBGL))}catch(e){console.warn("fAid error: getwebGlHash-getWebglReportHash-vendor&renderer info",e)}var n,o,t="";try{var i=function(e){return s.clearColor(0,0,0,1),s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),"["+e[0]+", "+e[1]+"]"},r=[];r.push("extensions:"+(s.getSupportedExtensions()||[]).join(";")),r.push("webgl aliased line width range:"+i(s.getParameter(s.ALIASED_LINE_WIDTH_RANGE))),r.push("webgl aliased point size range:"+i(s.getParameter(s.ALIASED_POINT_SIZE_RANGE))),r.push("webgl alpha bits:"+s.getParameter(s.ALPHA_BITS)),r.push("webgl antialiasing:"+(s.getContextAttributes().antialias?"yes":"no")),r.push("webgl blue bits:"+s.getParameter(s.BLUE_BITS)),r.push("webgl depth bits:"+s.getParameter(s.DEPTH_BITS)),r.push("webgl green bits:"+s.getParameter(s.GREEN_BITS)),r.push("webgl max anisotropy:"+((o=(n=s).getExtension("EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic"))?0===(n=n.getParameter(o.MAX_TEXTURE_MAX_ANISOTROPY_EXT))?2:n:null)),r.push("webgl max combined texture image units:"+s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),r.push("webgl max cube map texture size:"+s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE)),r.push("webgl max fragment uniform vectors:"+s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS)),r.push("webgl max render buffer size:"+s.getParameter(s.MAX_RENDERBUFFER_SIZE)),r.push("webgl max texture image units:"+s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS)),r.push("webgl max texture size:"+s.getParameter(s.MAX_TEXTURE_SIZE)),r.push("webgl max varying vectors:"+s.getParameter(s.MAX_VARYING_VECTORS)),r.push("webgl max vertex attribs:"+s.getParameter(s.MAX_VERTEX_ATTRIBS)),r.push("webgl max vertex texture image units:"+s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),r.push("webgl max vertex uniform vectors:"+s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS)),r.push("webgl max viewport dims:"+i(s.getParameter(s.MAX_VIEWPORT_DIMS))),r.push("webgl red bits:"+s.getParameter(s.RED_BITS)),r.push("webgl renderer:"+s.getParameter(s.RENDERER)),r.push("webgl shading language version:"+s.getParameter(s.SHADING_LANGUAGE_VERSION)),r.push("webgl stencil bits:"+s.getParameter(s.STENCIL_BITS)),r.push("webgl vendor:"+s.getParameter(s.VENDOR)),t=r.join("*")||""}catch(e){console.warn("fAid error: getwebGlHash-getWebglReportHash-vendor&renderer info",e)}return e+t}(),o="";try{o=Ct(t+n)}catch(e){console.warn("fAid error: getwebGlHash-hashTo32",e)}return o}()}var xt=new o({name:"onClose",onNewAegis:function(n){var o,i=this;a.desktop()?(o=window.onunload,window.onunload=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.publishNotReportedLog(n),null!=o&&o.call.apply(o,c([window],e))}):be(this.publishNotReportedLog.bind(this,n),!0)},publishNotReportedLog:function(t){var n=this;this.$walk(function(e){e===t&&(e.sendNow=!0,e.publishPluginsLogs(),n.publishThrottlePipeLogs(e))})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.eventPipeline([]),null!=e&&e.customTimePipeline([]),null!=e&&e.normalLogPipeline([])}}),Ot=(new o({name:"aid"}),new o({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e;t||(t=function(){try{var e=(r=window.navigator).userAgent+"*"+r.platform+(i=window.screen).width+"*"+i.height+window.screen.colorDepth+((o=null==(o=window.Intl)?void 0:o.DateTimeFormat)?null==(o=null==(o=new o)?void 0:o.resolvedOptions())?void 0:o.timeZone:"")+" + "+(new Date).getTimezoneOffset()+function(){function e(){return 0}var t=Math;try{var n=t.acos||e,o=t.acosh||e,i=t.asin||e,r=t.asinh||e,a=t.atanh||e,s=t.atan||e,l=t.sin||e,c=t.sinh||e,u=t.cos||e,d=t.cosh||e,f=t.tan||e,p=t.tanh||e,h=t.exp||e,g=t.expm1||e,m=t.log1p||e,v={acos:n(.12312423423423424),acosh:o(1e308),acoshPf:t.log(1e154+t.sqrt(1e308)),asin:i(.12312423423423424),asinh:r(1),asinhPf:t.log(1+t.sqrt(2)),atanh:a(.5),atanhPf:t.log(3)/2,atan:s(.5),sin:l(-1e300),sinh:c(1),sinhPf:t.exp(1)-1/t.exp(1)/2,cos:u(10.000000000123),cosh:d(1),coshPf:(t.exp(1)+1/t.exp(1))/2,tan:f(-1e300),tanh:p(1),tanhPf:(t.exp(2)-1)/(t.exp(2)+1),exp:h(1),expm1:g(1),expm1Pf:t.exp(1)-1,log1p:m(10),log1pPf:t.log(11),powPI:t.pow(t.PI,-100)};return Object.values(v).join("*")}catch(e){return""}}()+Pt();return t=Ct(e),n=0,"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".split("").map(function(e){return"x"===e?t[n++]:e}).join("")}catch(e){console.warn(e)}var t,n,o,i,r;return""}()||Z(),window.localStorage.setItem("AEGIS_ID",t)),this.aid=t}catch(e){console.warn(e)}},onNewAegis:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}));return N.use(tt),N.use(je),N.use(Re),N.use(ot),N.use(wt),N.use(Ot),N.use(C),N.use(t),N.use(St),N.use(xt),N.use(We),N});