!function(){var e={920:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var n=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};e.exports=function(){"use strict";var e,r,o=function(t){this.name="__st"+(1e9*Math.random()>>>0)+e+"__",null!=t&&t.forEach(this.add,this),e+=1},i=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r},a=function(){var e=this;this.emit=function(t,n){if(e){var r;if(null!=(o=e.eventsList[t])&&o.length)for(var o=o.slice(),i=0;i<o.length;i++){r=o[i];try{var a=r.callback.apply(e,[n]);if(1===r.type&&e.remove(t,r.callback),!1===a)break}catch(e){throw e}}return e}},this.eventsList={}},s=function(e){return function(){for(var t=0;t<2*e;t++)he[t]=Math.floor(16*Math.random())+48,58<=he[t]&&(he[t]+=39);return String.fromCharCode.apply(null,he.slice(0,2*e))}},c=function(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)}))},u=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},l=function(e){for(var t,n,r,o="",i=0,a=(e=String(e)).length%3;i<e.length;){if(255<(t=e.charCodeAt(i++))||255<(n=e.charCodeAt(i++))||255<(r=e.charCodeAt(i++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");o+=ge.charAt((t=t<<16|n<<8|r)>>18&63)+ge.charAt(t>>12&63)+ge.charAt(t>>6&63)+ge.charAt(63&t)}return a?o.slice(0,a-3)+"===".substring(a):o},f=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!me.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,o="",i=0;i<e.length;)t=ge.indexOf(e.charAt(i++))<<18|ge.indexOf(e.charAt(i++))<<12|(n=ge.indexOf(e.charAt(i++)))<<6|(r=ge.indexOf(e.charAt(i++))),o+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o},d=function(e){var t;return"object"==typeof e&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=e[r]||"function"==typeof e.get&&e.get(r);if(o)return[r,o]}return["",""]}(e,Object.keys(ye)))[0],e=e[1],t)?ye[t](e):""},p=function(e,t,n){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n},h=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?re.string:re.number},g=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},m=function(e,t){return void 0===t&&(t=2048),String(e).replace(ae,"").slice(0,t)},v=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null===location||void 0===location?void 0:location.protocol):/^https/.test(e)},y=function(e,t,n){var r,o,i,a;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return i=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,a=o.isErr,{code:void 0===i?fe:i,isErr:a};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:fe,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(Te=[].concat(t.ret.map((function(e){return e.toLowerCase()}))));var s=Object.getOwnPropertyNames(e).filter((function(e){return-1!==Te.indexOf(e.toLowerCase())}));return s.length?{code:""+(i="未知"!==(i=e[s[0]])&&""!==i?i:fe),isErr:0!==i&&"0"!==i&&i!==fe}:{code:fe,isErr:!1}}catch(e){return{code:fe,isErr:!1}}},b=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url)||"":e;return ke(r).slice(0,102400)}catch(e){return""}},w=function(e,t){return"string"!=typeof e||!e||t&&-1<e.indexOf(t)||Ae.test(e)||se.some((function(t){return-1<e.indexOf(t)}))},E=function(e,t){var n,r=[],o=e.config;return e.lifeCycle.on("destroy",(function(){r.length=0})),function(i,a){Array.isArray(i)?r=r.concat(i):r.push(i),t&&r.length>=t||e.sendNow&&0<r.length?(r=Ne(r),a(r.splice(0,r.length)),n&&clearTimeout(n)):(n&&clearTimeout(n),n=setTimeout((function(){n=null,0<(r=Ne(r)).length&&a(r.splice(0,r.length))}),o.delay))}},R=function(e,t){return Array.isArray(e)?t(e.map((function(e){return t=ie(ie({},e),{msg:"string"==typeof e.msg?e.msg:[].concat(e.msg).map(Pe).join(" ")}),ue.forEach((function(e){t[e]||delete t[e]})),t;var t}))):t([ie(ie({},e),{msg:"string"==typeof e.msg?e.msg:Pe(e.msg)})])},O=function(e,t){return function(n,r){var o,i,a,s=Array.isArray(n),c=s?n:[n],u=(e.lifeCycle.emit("beforeRequest",n),e.config.beforeRequest);(c="function"==typeof u?c.map((function(e){try{var n=u({logs:e,logType:t});return(null==n?void 0:n.logType)===t&&null!=n&&n.logs?n.logs:!1!==n&&e}catch(t){return e}})).filter((function(e){return!1!==e})):c).length&&(o=c,n=ue,!Array.isArray(o)||o.length<=1||(i=[],a=[],!(a="string"==typeof n?[n]:n))||a.length<=0||(a.forEach((function(e){o.forEach((function(t){null!=t&&t[e]&&i.push(e)}))})),0<i.length&&(o=o.map((function(e){var t={};return i.forEach((function(e){t[e]=""})),ie(ie({},t),e)})))),c=o,r(s?c:c[0]))}},S=function(e){return function(t,n){e.lifeCycle.emit("modifyRequest",t);var r=e.config.modifyRequest;if("function"==typeof r)try{var o=r(t);"object"==typeof o&&"url"in o&&(t=o)}catch(e){console.error(e)}n(t)}},T=function(e){return function(t,n){null!=(r=e.lifeCycle)&&r.emit("afterRequest",t);var r=(e.config||{}).afterRequest;"function"==typeof r&&!1===r(t)||n(t)}},x=function(e){if(e&&e.reduce&&e.length)return 1===e.length?function(t,n){e[0](t,n||Me)}:e.reduce((function(e,t){return function(n,r){return void 0===r&&(r=Me),e(n,(function(e){return null==t?void 0:t(e,r)}))}}));throw new TypeError("createPipeline need at least one function param")},P=function(e,t){Object.getOwnPropertyNames(e).forEach((function(n){"function"==typeof e[n]&&"constructor"!==n&&(t?t[n]="sendPipeline"===n?function(){return function(){}}:function(){}:e[n]=function(){})}))},L=function(){return void 0!==window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now},k=function(e){return-1!==$e.indexOf(e)},C=function(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},I=function(){return{host:new URL(location.href).host,pathname:location.pathname}},A=function(e,n,r){return null!=n&&n.length&&"object"==typeof e?n.reduce((function(n,o){var i=window.Headers&&t(e,Headers)?e.get(o):e[o];return i?n+(""===n?"":"\n\n")+r+" header "+o+": "+i:n}),""):""},N=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},j=function(e,t,n){var r,o;return void 0===t&&(t=""),e="function"==typeof(null==(o=e.api)?void 0:o.resourceTypeHandler)?null==(o=e.api)?void 0:o.resourceTypeHandler(n):"",-1===le.indexOf(e)&&(r=void 0===t?"":t,o=(void 0===n?"":n).split("?")[0],e=Se.test(o)||Oe.some((function(e){return-1!==String(r).indexOf(e)}))?"static":"fetch"),e},q=function(e,t){return e?we.AJAX_ERROR:t?we.RET_ERROR:we.API_RESPONSE},U=function(e,t){return null!=(e=e.api)&&e.usePerformanceTiming&&"string"==typeof t.url&&(e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop())?{url:t.url,isHttps:v(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:h(e.domainLookupEnd-e.domainLookupStart),connectTime:h(e.connectEnd-e.connectStart)}:{url:t.url,isHttps:v(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:re.number,connectTime:re.number}},H=function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r},_=function(){gt=[],pt=-1,dt=null,F(addEventListener)},D=function(e,t){dt||(dt=t,pt=e,ht=new Date,F(removeEventListener),M())},M=function(){var e;0<=pt&&pt<ht-vt&&(e={entryType:"first-input",name:dt.type,target:dt.target,cancelable:dt.cancelable,startTime:dt.timeStamp,processingStart:dt.timeStamp+pt},gt.forEach((function(t){t(e)})),gt=[])},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,yt,mt)}))},B=function(e,t){var n=Ht(),r="navigate";return 0<=qt?r="back-forward-cache":n&&(document.prerendering||0<_t()?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{var r;if(PerformanceObserver.supportedEntryTypes.includes(e))return(r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}))).observe(Object.assign({type:e,buffered:!0},n||{})),r}catch(e){}},G=function(e,t,n,r){var o,i;return function(a){0<=t.value&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=(a=t.value)>n[1]?"poor":a>n[0]?"needs-improvement":"good",e(t))}},X=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},V=function(e){function t(t){"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)}addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},$=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},J=function(){return Dt<0&&(Dt=Mt(),Bt(),Ut((function(){setTimeout((function(){Dt=Mt(),Bt()}),0)}))),{get firstHiddenTime(){return Dt}}},K=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},z=function(e,t){t=t||{},K((function(){var n,r=J(),o=B("FCP"),i=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime)&&(o.value=Math.max(e.startTime-_t(),0),o.entries.push(e),n(!0))}))}));i&&(n=G(e,o,Wt,t.reportAllChanges),Ut((function(r){o=B("FCP"),n=G(e,o,Wt,t.reportAllChanges),X((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Y=function(){var e;0<=Ct&&Ct<It-Vt&&(e={entryType:"first-input",name:kt.type,target:kt.target,cancelable:kt.cancelable,startTime:kt.timeStamp,processingStart:kt.timeStamp+Ct},At.forEach((function(t){t(e)})),At=[])},Q=function(e){var t,n,r,o;function i(){$t(n,r),o()}function a(){o()}e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,o=function(){removeEventListener("pointerup",i,Xt),removeEventListener("pointercancel",a,Xt)},addEventListener("pointerup",i,Xt),addEventListener("pointercancel",a,Xt)):$t(t,e))},Z=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Q,Xt)}))},ee=function(e,t){function n(e,t,n,r){addEventListener(e,(function o(i){"visibilitychange"===e&&"hidden"!==document.visibilityState||(r?setTimeout((function(){return t(i)}),r):t(i),n&&removeEventListener(e,o,!0))}),!0)}var r;n("visibilitychange",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.visibilitychange),n("pagehide",e,null==t?void 0:t.once,null==(r=null==t?void 0:t.delay)?void 0:r.pagehide)},te=function(e){var t=e.name;0<(e=e.value)&&(Yt[t]=e)},ne=function(){this.constructor=jt};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 r=arguments[1],o=0;o<n;){var i=t[o];if(e.call(r,i,o,t))return i;o+=1}}}),window.WeakSet||(e=Date.now()%1e9,o.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},o.prototype.delete=function(e){return!!e[this.name]&&!(e[this.name]=void 0)},o.prototype.has=function(e){return!!e[this.name]},r=o,Object.defineProperty(window,"WeakSet",{value:function(e){return new r(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!=(r=arguments[n]))for(var r=Object(r),o=Object.keys(Object(r)),i=0,a=o.length;i<a;i++){var s=o[i],c=Object.getOwnPropertyDescriptor(r,s);null!=c&&c.enumerable&&(t[s]=r[s])}return t}});var re,oe=function(e,n){return(oe=Object.setPrototypeOf||(t({__proto__:[]},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,n)},ie=function(){return(ie=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ae=/_?t(\d)?(imestamp)?=\d+&?/g,se=["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","tdm.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","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8"],ce=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],ue=["ext1","ext2","ext3","level","trace","tag","seq","code"],le=["static","fetch"],fe="unknown",de=(a.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},a.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},a.prototype.one=function(e,t){this.on(e,t,1)},a.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}},a.prototype.clear=function(){this.eventsList={}},a),pe={generateTraceId:s(16),generateSpanId:s(8)},he=Array(32),ge="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",me=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,ve=(p.prototype.generate=function(e,t,n){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(n);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=pe.generateSpanId();return"00-"+pe.generateTraceId()+"-"+e+"-0"+Number(1).toString(16)},p.prototype.createB3=function(){var e=pe.generateSpanId();return pe.generateTraceId()+"-"+e+"-1"},p.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:l,n=void 0===(n=(e=e||{}).host)?"":n,r=(e=void 0===(e=e.pathname)?"":e,u()),o=u();return"1-"+String(t(o))+"-"+String(t(r))+"-1-"+String(t("aegis"))+"-"+String(t("1.43.5"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},p.prototype.createSentryTrace=function(){var e=c().substring(16);return c()+"-"+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),ye={sw8:function(e){var t="function"==typeof atob?atob:f;return(e=e.split("-")[1])?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},be=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,Le(n)};(Fe=re=re||{})[Fe.number=-1]="number",Fe.string="";var we,Ee,Re,Oe=["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"],Se=/\.(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|)$/i,Te=["ret","retcode","code","errcode"],xe=function(){var e=new WeakSet;return function(n,r){if(t(r,Error))return"Error.message: "+r.message+" \n  Error.stack: "+r.stack;if("object"==typeof r&&null!==r){if(e.has(r))return"[Circular "+(n||"root")+"]";e.add(r)}return r}},Pe=function(e){if("string"==typeof e)return e;try{return t(e,Error)?(JSON.stringify(e,xe(),4)||"undefined").replace(/"/gim,""):JSON.stringify(e,xe(),4)||"undefined"}catch(e){return"error happen when aegis stringify: \n "+e.message+" \n "+e.stack}},Le=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,xe())||"undefined"}catch(e){return"error happen when aegis stringify: \n "+e.message+" \n "+e.stack}},ke=function(e,n){void 0===n&&(n=3);var r,o,i,a="";return Array.isArray(e)?(a+="[",r=e.length,e.forEach((function(e,t){a=(a+="object"==typeof e&&1<n?ke(e,n-1):Ie(e))+(t===r-1?"":",")})),a+="]"):t(e,Object)?(a="{",o=Object.keys(e),i=o.length,o.forEach((function(t,r){"object"==typeof e[t]&&1<n?a+='"'+t+'":'+ke(e[t],n-1):a+=Ce(t,e[t]),a+=r===i-1||r<i-1&&void 0===e[o[r+1]]?"":","})),a+="}"):a+=e,a},Ce=function(e,t){var r=void 0===t?"undefined":n(t),o="";return"string"==r||"object"==r?o+='"'+e+'":"'+t+'"':"function"==typeof t?o+='"'+e+'":"function '+t.name+'"':"symbol"==(void 0===t?"undefined":n(t))?o+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!=r||(o+='"'+e+'": '+t),o},Ie=function(e){var t=void 0===e?"undefined":n(e);return""+("undefined"==t||"symbol"==t||"function"==t?"null":"string"==t||"object"==t?'"'+e+'"':e)},Ae=/data:(image|text|application|font)\/.*;base64/,Ne=((Fe=we=we||{}).INFO_ALL="-1",Fe.API_RESPONSE="1",Fe.INFO="2",Fe.ERROR="4",Fe.PROMISE_ERROR="8",Fe.AJAX_ERROR="16",Fe.SCRIPT_ERROR="32",Fe.IMAGE_ERROR="64",Fe.CSS_ERROR="128",Fe.CONSOLE_ERROR="256",Fe.MEDIA_ERROR="512",Fe.RET_ERROR="1024",Fe.REPORT="2048",Fe.PV="4096",Fe.EVENT="8192",Fe.PAGE_NOT_FOUND_ERROR="16384",Fe.WEBSOCKET_ERROR="32768",Fe.BRIDGE_ERROR="65536",Fe.LAZY_LOAD_ERROR="131072",(Fe=Ee=Ee||{}).LOG="log",Fe.SPEED="speed",Fe.PERFORMANCE="performance",Fe.OFFLINE="offline",Fe.WHITE_LIST="whiteList",Fe.VITALS="vitals",Fe.PV="pv",Fe.CUSTOM_PV="customPV",Fe.EVENT="event",Fe.CUSTOM="custom",Fe.SDK_ERROR="sdkError",Fe.SET_DATA="setData",Fe.LOAD_PACKAGE="loadPackage",(Fe=Re=Re||{}).production="production",Fe.development="development",Fe.gray="gray",Fe.pre="pre",Fe.daily="daily",Fe.local="local",Fe.test="test",Fe.others="others",function(e){return e.filter((function(t,n){return"static"!==t.type||!e.find((function(e,r){return t.url===e.url&&200===t.status&&n<r}))}))}),je=function(e){e.level===we.INFO_ALL&&(e.level=we.INFO)},qe={},Ue={},He=function(e){return qe[e]||(qe[e]=setTimeout((function(){Ue[e]={},qe[e]=null}),6e4)),qe[e]},_e=function(e){return(Array.isArray(e)?e:[e]).map((function(e){return Object.getOwnPropertyNames(e).reduce((function(t,n){return"ctx"!==n&&(t[n]=e[n]),t}),{level:we.INFO,msg:""})}))},De=function(e){return function(t){return e.sendPipeline([function(t,n){return n({url:e.config.url||"",data:be(_e(t)),method:"post",contentType:"application/json",type:Ee.LOG,log:t,requestConfig:{timeout:5e3},success:function(){var r=e.config.onReport;"function"==typeof r&&t.forEach((function(e){r(e)})),"function"==typeof n&&n([])}})}],Ee.LOG)(t)}},Me=function(){},Fe=(Ke.use=function(e){-1===Ke.installedPlugins.indexOf(e)&&e.aegisPlugin&&Ke.installedPlugins.push(e)},Ke.unuse=function(e){-1!==(e=Ke.installedPlugins.indexOf(e))&&Ke.installedPlugins.splice(e,1)},Ke.prototype.init=function(e){this.setConfig(e);for(var t=0;t<Ke.installedPlugins.length;t++)try{Ke.installedPlugins[t].patch(this)}catch(e){this.sendSDKError(e)}this.lifeCycle.emit("onInited")},Ke.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=Ke.instances.indexOf(this);-1!==r&&Ke.instances.splice(r,1);for(var o=Ke.installedPlugins.length-1;0<=o;o--)try{Ke.installedPlugins[o].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 i=this;i.constructor!==Object&&P(i,this),i=Object.getPrototypeOf(i););0===Ke.instances.length&&(r=Object.getPrototypeOf(this).constructor,P(r),P(Ke))}},Ke.prototype.setConfig=function(e){Object.assign(this.config,e);var t=(e=this.config).id,n=e.uin,r=e.version,o=e.ext1,i=e.ext2,a=e.ext3,s=e.aid,c=void 0===(u=e.env)?"production":u,u=e.pageUrl;return e=this.bean.id!==t||this.bean.uin!==n||this.bean.aid!==s,this.bean.id=t||"",this.bean.uin=n||"",this.bean.version=r||"1.43.5",this.bean.aid=s||"",this.bean.env=function(){switch(c){case Re.production:case Re.development:case Re.gray:case Re.pre:case Re.daily:case Re.local:case Re.test:case Re.others:return 1;default:return}}()?c:Re.others,u&&this.extendBean("from",encodeURIComponent(u.slice(0,2048))),o&&this.extendBean("ext1",encodeURIComponent(o)),i&&this.extendBean("ext2",encodeURIComponent(i)),a&&this.extendBean("ext3",encodeURIComponent(a)),e&&this.lifeCycle.emit("onConfigChange",this.config),this.config},Ke.prototype.extendBean=function(e,t){this.bean[e]=t},Ke.prototype.send=function(e,t,n){var r=this;return x([S(this),function(e,o){r.request(e,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];o({isErr:!1,result:n,logType:e.type,logs:e.log}),null!=t&&t.apply(void 0,n)}),(function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];o({isErr:!0,result:t,logType:e.type,logs:e.log}),null!=n&&n.apply(void 0,t)}))},T(this)])(e)},Ke.prototype.sendSDKError=function(e){var t=this;this.sendPipeline([function(e,n){n({url:t.config.url+"?id=1085&msg[0]="+encodeURIComponent(Pe(e))+"&level[0]=2&from="+t.config.id+"&count=1&version="+t.config.id+"(1.43.5)",addBean:!1,method:"get",type:Ee.SDK_ERROR,log:e})}],Ee.SDK_ERROR)(e)},Ke.prototype.sendPipeline=function(e,t){var n,r=this;return x(i([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}},O(n=this,t)],e,[S(this),function(e,t){r.request(e,(function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=!1;-1<(""+n[r.failRequestCount=0]).indexOf("403 forbidden")&&(a=!0,r.destroy()),t({isErr:a,result:n,logType:null==e?void 0:e.type,logs:null==e?void 0:e.log}),null!=(a=null==e?void 0:e.success)&&a.call.apply(a,i([e],n))}),(function(){for(var n,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];60<=++r.failRequestCount&&r.destroy(),-1<(""+o[0]).indexOf("403 forbidden")&&r.destroy(),t({isErr:!0,result:o,logType:null==e?void 0:e.type,logs:null==e?void 0:e.log}),null!=(n=null==e?void 0:e.fail)&&n.call.apply(n,i([e],o))}))},T(this)]))},Ke.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:we.INFO,msg:e};1===e.length&&e[0].msg&&Object.assign(n,ie({},e[0]),{level:we.INFO}),this.normalLogPipeline(n)},Ke.prototype.infoAll=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:we.INFO_ALL,msg:e};1===e.length&&e[0].msg&&Object.assign(n,ie({},e[0]),{level:we.INFO_ALL}),this.normalLogPipeline(n)},Ke.prototype.report=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:we.REPORT,msg:e};1===e.length&&e[0].msg&&Object.assign(n,ie({},e[0])),this.normalLogPipeline(n)},Ke.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n={level:we.ERROR,msg:e};1===e.length&&e[0].msg&&Object.assign(n,ie({},e[0]),{level:we.ERROR}),this.normalLogPipeline(n)},Ke.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"))},Ke.prototype.reportT=function(e){var t=e.name,n=e.duration,r=void 0===(r=e.ext1)?"":r,o=void 0===(o=e.ext2)?"":o,i=void 0===(i=e.ext3)?"":i;if(e=e.from,"string"==typeof t&&"number"==typeof n&&"string"==typeof r&&"string"==typeof o&&"string"==typeof i){if(!(n<0||6e4<n))return this.submitCustomTime(t,n,r,o,i,void 0===e?"":e);console.warn("reportTime: duration must between 0 and 60000")}else console.warn("reportTime: params error")},Ke.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")},Ke.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")},Ke.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")},Ke.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},Ke.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},Ke.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},Object.defineProperty(Ke.prototype,"__version__",{get:function(){return"1.43.5"},enumerable:!1,configurable:!0}),Object.defineProperty(Ke.prototype,"LogType",{get:function(){return we},enumerable:!1,configurable:!0}),Ke.prototype.reportPv=function(e){e&&console.warn("reportPv is deprecated, please use reportEvent")},Ke.prototype.submitCustomTime=function(e,t,n,r,o,i){this.customTimePipeline({name:e,duration:t,ext1:n||this.config.ext1,ext2:r||this.config.ext2,ext3:o||this.config.ext3,from:i||void 0})},Ke.version="1.43.5",Ke.instances=[],Ke.logType=we,Ke.environment=Re,Ke.installedPlugins=[],Ke),Be=(C.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewAegis(e))},C.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},C.prototype.countInstance=function(){return this.instances.length},C.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},C.prototype.walk=function(e){var t=this;this.instances.forEach((function(n){var r=t.canUse(n);r&&e(n,r)}))},C.prototype.canUse=function(e){return!(!(e=this.getConfig(e))||"object"!=typeof e)||!!e},C.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},C.prototype.exist=function(e){return-1===this.instances.indexOf(e)},C.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))},C.prototype.triggerOnNewAegis=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewAegis)&&t.call(this.option,e,this.getConfig(e))},C),We=new Be({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("AEGIS_ID");t||(t="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)})),window.localStorage.setItem("AEGIS_ID",t)),this.aid=t}catch(e){}},onNewAegis:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),Ge=function(e){var t;return e.payload?(t={},Object.keys(e).forEach((function(n){"payload"!==n&&(t[n]=e[n])})),t):e},Xe=new Be({name:"reportAssetSpeed"}),Ve=Xe=new Be({name:"reportAssetSpeed",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],onNewAegis:function(e){var t=this;L()&&(this.collectSuccessLog(e),this.collectFailLog(e),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},publish:function(e,t){this.$walk((function(n){n===t&&n.speedLogPipeline(e)}))},publishMany:function(e,t){for(var n=t.config,r=0,o=e.length;r<o;r++){var i=e[r];-1===this.ASSETS_INITIATOR_TYPE.indexOf(i.initiatorType)||w(i.name,n.hostUrl)||this.publish(this.generateLog(i,n),t)}},collectSuccessLog:function(e){var t,n,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),e),(t=new window.PerformanceObserver((function(t){r.publishMany(t.getEntries(),e)}))).observe({entryTypes:[this.collectEntryType]}),e.lifeCycle.on("destroy",(function(){0===Xe.countInstance()&&t.disconnect()}))):(n=setInterval((function(){var t=performance.getEntriesByType(r.collectEntryType),n=t.slice(r.collectCur);r.collectCur=t.length,r.publishMany(n,e)}),3e3),e.lifeCycle.on("destroy",(function(){0===Xe.countInstance()&&clearInterval(n)})))},collectFailLog:function(e){var t=function(t){var o,i;t&&(t=t.target||t.srcElement,!(o=(null==t?void 0:t.src)||(null==t?void 0:t.href))||"string"!=typeof o||-1<window.location.href.indexOf(o)||(t="function"==typeof(null==(t=r.api)?void 0:t.resourceTypeHandler)?null==(t=r.api)?void 0:t.resourceTypeHandler(o):"",i=performance.getEntriesByType(n.collectEntryType).find((function(e){return e.name===o})),w(o,r.hostUrl))||(i={url:m(o),status:400,duration:Number(((null==i?void 0:i.duration)||0).toFixed(2)),method:"get",type:t||"static",isHttps:v(o),urlQuery:g(o,!0),nextHopProtocol:"",domainLookup:0,connectTime:0},n.publish(i,e)))},n=this,r=e.config;window.document.addEventListener("error",t,!0),e.lifeCycle.on("destroy",(function(){0===Xe.countInstance()&&window.document.removeEventListener("error",t,!0)}))},generateLog:function(e,t){t="function"==typeof(null==(n=t.api)?void 0:n.resourceTypeHandler)?null==(n=t.api)?void 0:n.resourceTypeHandler(e.name):"";var n=e.transferSize;return{url:m(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:v(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:g(e.name,!0),domainLookup:h(e.domainLookupEnd-e.domainLookupStart),connectTime:h(e.connectEnd-e.connectStart),transferSize:0<n?n:-1}},collectNotReportedLog:function(e){var t,n;L()&&(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(){}}}),$e=window.navigator.userAgent.toLowerCase(),Je={};function Ke(e){var t,n,r,o,i,a,s,c,u,l,f,d,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:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:"",reportImmediately:!0},this.isWhiteList=!1,this.lifeCycle=new de,this.bean={},this.normalLogPipeline=x([E(this,5),R,function(e,n){var r=t.config;n(e=e.map((function(e){var t,n=r.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=Pe(e.msg).substring(0,r.maxLength)}return e})))},(h=(t=this).config,function(e,t){var n="number"==typeof h.repeat?h.repeat:60;if(n<=0)return t(e);var r=(null==h?void 0:h.id)+"_error",o=Ue[r]||{};t(e.filter((function(e){if(e.level===we.ERROR||e.level===we.PROMISE_ERROR||e.level===we.AJAX_ERROR||e.level===we.SCRIPT_ERROR||e.level===we.IMAGE_ERROR||e.level===we.CSS_ERROR||e.level===we.MEDIA_ERROR||e.level===we.RET_ERROR||e.level===we.BRIDGE_ERROR||e.level===we.PAGE_NOT_FOUND_ERROR||e.level===we.WEBSOCKET_ERROR||e.level===we.LAZY_LOAD_ERROR){if(e=e.msg.slice(0,200),o[e]>n)return qe[r]||He(r),!1;o[e]=1+~~o[e],Ue[r]=o}return!0})))}),(d=this.lifeCycle.emit,p=this.config,function(e,t){var n,r=p.logCreated;return"function"==typeof r?(n=e.filter((function(e){return!1!==r(e)})),d("beforeWrite",n),t(n)):(d("beforeWrite",e),t(e))}),(f=this,setTimeout((function(){var e=void 0===(t=(n=f.config).pvUrl)?"":t,t=n.spa,n=-1<["web-sdk","mp-sdk"].indexOf("web-sdk");e&&(n&&!t||!n)&&f.sendPipeline([function(t,n){n({url:e,type:Ee.PV})}],Ee.PV)(null)}),100),function(e,t){t(e)}),(u=c=s=!1,l=[],(i=this).lifeCycle.on("onConfigChange",(function(){a&&clearTimeout(a),a=setTimeout((function(){var e,t;!u&&i.config&&(u=!0,e=i.config.whiteListUrl,(t=void 0===e?"":e)&&i.sendPipeline([function(e,n){n({url:t,type:Ee.WHITE_LIST,success:function(e){c=!0;try{var t=e.data||JSON.parse(e),n=t.retcode,r=t.result,o=void 0===r?{}:r,a=(0===n&&(s=o.is_in_white_list,i.isWhiteList=s,0<=o.rate)&&o.rate<=1&&(i.config.random=o.rate,i.isGetSample=!1),i.isWhiteList&&l.length?De(i)(l.splice(0),(function(){})):!i.isWhiteList&&l.length&&(l.length=0),i.config.onWhitelist);"function"==typeof a&&a(s)}catch(e){}},fail:function(){c=!0}})}],Ee.WHITE_LIST)(null),u=!1)}),i.config.uin?50:500)})),i.lifeCycle.on("destroy",(function(){l.length=0})),function(e,t){var n;s||null!=(n=null==(n=i.config)?void 0:n.api)&&n.reportRequest?t(e.concat(l.splice(0)).map((function(e){return je(e),e}))):(n=e.filter((function(e){return e.level!==we.INFO&&e.level!==we.API_RESPONSE?(je(e),!0):(c||(l.push(e),200<=l.length&&(l.length=200)),!1)}))).length&&t(n)}),function(e,t){try{var n=JSON.parse(JSON.stringify(e)),r=(g.lifeCycle.emit("beforeReport",n),g.config.beforeReport);(e="function"==typeof r?e.filter((function(e){return!1!==r(e)})):e).length&&t(e)}catch(e){}},De(this)]),this.eventPipeline=x([E(this,10),(o=this,function(e){o.sendPipeline([function(e,t){var n=e.map((function(e){return{name:e.name,ext1:e.ext1||o.config.ext1||"",ext2:e.ext2||o.config.ext2||"",ext3:e.ext3||o.config.ext3||""}}));t({url:o.config.eventUrl+"?payload="+encodeURIComponent(JSON.stringify(n)),type:Ee.EVENT,log:e})}],Ee.EVENT)(e)})]),this.customTimePipeline=x([E(this,10),(r=this,function(e){return r.sendPipeline([function(e,t){t({url:r.config.customTimeUrl+"?payload="+encodeURIComponent(JSON.stringify({custom:e})),type:Ee.CUSTOM,log:e})}],Ee.CUSTOM)(e)})]),this.timeMap={},this.failRequestCount=0,this.config=(n=this.config,void 0===(e=e.hostUrl)&&(e="https://aegis.qq.com"),n.url=n.url||e+"/collect",n.offlineUrl=n.offlineUrl||e+"/offline",n.whiteListUrl=n.whiteListUrl||e+"/collect/whitelist",n.pvUrl=n.pvUrl||e+"/collect/pv",n.eventUrl=n.eventUrl||e+"/collect/events",n.speedUrl=n.speedUrl||e+"/speed",n.customTimeUrl=n.customTimeUrl||e+"/speed/custom",n.performanceUrl=n.performanceUrl||e+"/speed/performance",n.performanceUrlForHippy=n.performanceUrlForHippy||e+"/speed/hippyPerformance",n.webVitalsUrl=n.webVitalsUrl||e+"/speed/webvitals",n.setDataReportUrl=n.SetDataReportUrl||e+"/speed/miniProgramData",n),Ke.instances.push(this)}Je.macos=function(){return k("mac")},Je.ios=function(){return Je.iphone()||Je.ipod()||Je.ipad()},Je.iphone=function(){return!Je.windows()&&k("iphone")},Je.ipod=function(){return k("ipod")},Je.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return k("ipad")||e},Je.android=function(){return!Je.windows()&&k("android")},Je.androidPhone=function(){return Je.android()&&k("mobile")},Je.androidTablet=function(){return Je.android()&&!k("mobile")},Je.blackberry=function(){return k("blackberry")||k("bb10")},Je.blackberryPhone=function(){return Je.blackberry()&&!k("tablet")},Je.blackberryTablet=function(){return Je.blackberry()&&k("tablet")},Je.windows=function(){return k("windows")},Je.windowsPhone=function(){return Je.windows()&&k("phone")},Je.windowsTablet=function(){return Je.windows()&&k("touch")&&!Je.windowsPhone()},Je.fxos=function(){return(k("(mobile")||k("(tablet"))&&k(" rv:")},Je.fxosPhone=function(){return Je.fxos()&&k("mobile")},Je.fxosTablet=function(){return Je.fxos()&&k("tablet")},Je.meego=function(){return k("meego")},Je.cordova=function(){return window.cordova&&"file:"===location.protocol},Je.nodeWebkit=function(){return"object"==typeof window.process},Je.mobile=function(){return Je.androidPhone()||Je.iphone()||Je.ipod()||Je.windowsPhone()||Je.blackberryPhone()||Je.fxosPhone()||Je.meego()},Je.tablet=function(){return Je.ipad()||Je.androidTablet()||Je.blackberryTablet()||Je.windowsTablet()||Je.fxosTablet()},Je.desktop=function(){return!Je.tablet()&&!Je.mobile()};var ze,Ye,Qe,Ze,et,tt,nt,rt=!(Je.isIE=function(){return"ActiveXObject"in window}),ot=[],it=/^\/[^/]/,at=!1,st=[],ct=(new Be({name:"reportApiSpeed"}),new Be({name:"reportApiSpeed",override:!1,onNewAegis:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new ve(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e))},overrideFetch:function(e,t){var n=this,r=e.api,o=(r={name:this.name,traceRequestHeader:null!=r&&r.injectTraceHeader?this.traceRequestHeader:null,then:function(r,o,i,a){var s,c;w(i,e.hostUrl)||(s=r.headers?r.headers.get("content-type"):"","fetch"===(c=j(e,s||"",i))?r.clone().text().then((function(s){var u,l=r.status<=0||400<=r.status,f=(null==(f=e.api)?void 0:f.reqHeaders)||[],p=A(null==a?void 0:a.headers,f,"req"),h=(f=(null==(f=e.api)?void 0:f.resHeaders)||[],A(r.headers,f,"res")),g=d(null==a?void 0:a.headers),m=(f=y(s,e.api,{url:i,ctx:r,payload:null==a?void 0:a.body})).code,v=f.isErr,w=(f=null==(f=e.api)?void 0:f.apiDetail)?b(null==a?void 0:a.body,null==(u=e.api)?void 0:u.reqParamHandler,{url:i}):"",E=f?b(s,null==(u=e.api)?void 0:u.resBodyHandler,{url:i,ctx:r}):"";setTimeout((function(){var u=U(e,{url:i,duration:o,type:c,status:r.status||0,method:(null==a?void 0:a.method)||"get"}),f=[l?"FETCH_ERROR: "+s:"","fetch req url: "+i,"res status: "+(u.status||0),"res duration: "+u.duration+"ms",p,h,"req method: "+(u.method||"GET"),"res retcode: "+m,N(w,"req param"),N(E,"res data")].filter((function(e){return e})).join("\n\n");u.payload=null==a?void 0:a.body,u.ret=m,u.isErr=+v,n.publishNormalLog({msg:f,level:q(l,v),code:m,trace:g},t),n.publishSpeed(u,t)}),0)})):setTimeout((function(){var s=U(e,{url:i,duration:o,type:c,status:r.status||0,method:(null==a?void 0:a.method)||"get"});s.type="static",s.urlQuery=g(i,!0),n.publishSpeed(s,t)}),0))},catch:function(r,o,i,a){var s,c,u,l,f;throw w(i,e.hostUrl)||(s=j(e,"",i),c=(null==(c=e.api)?void 0:c.reqHeaders)||[],u=A(null==a?void 0:a.headers,c,"req"),l=d(null==a?void 0:a.headers),f=null!=(c=e.api)&&c.apiDetail?b(null==a?void 0:a.body,null==(c=e.api)?void 0:c.reqParamHandler,{url:i}):"",setTimeout((function(){var c=U(e,{url:i,duration:o,type:s,status:0,method:(null==a?void 0:a.method)||"get"});n.publishSpeed(c,t),c="AJAX_ERROR: "+r+"\n                          \nreq url: "+i+"\n                          \nres status: 0\n                          \nres duration: "+c.duration+"ms\n                          \nreq method: "+((null==a?void 0:a.method)||"get")+"\n                          \nreq param: "+f+"\n                          \n"+u,n.publishNormalLog({msg:c,level:we.AJAX_ERROR,code:-400,trace:l},t)}),0)),r}},this.hackFetchOptions=r,this.hackFetchOptions),i=null==(r=e.api)?void 0:r.ignoreHackReg;if(void 0===i&&(i=/\.flv(\?|$)/gi),st.find((function(e){return e.name===o.name})))throw new Error("name '"+o.name+"' is already in hackFetch option list");st.push(o),!at&&window.fetch&&(at=!0,Ze=window.fetch,window.fetch=function(e,t){void 0===t&&(t={});var n="string"==typeof e?e:null==e?void 0:e.url;if(null!=(c=null==i?void 0:i.test)&&c.call(i,n))return Ze(n,t);it.test(n)&&(n=""+location.origin+n);var r,a,s,c=(o||{}).traceRequestHeader;c&&(r=void 0===(r=(t||{}).headers)?{}:r,a=(s=I()).host,s=s.pathname,a=(c=c.generate(n,r,{host:a,pathname:s})||{}).name,s=c.value)&&a&&(t.headers=Object.assign(r,((c={})[a]=s,c)));for(var u=0;u<st.length;u++){var l=st[u];try{"function"==typeof l.beforeFetch&&l.beforeFetch(n,t)}catch(e){}}var f=Date.now();return Ze(e,t).then((function(e){for(var r=e.clone(),o=0;o<st.length;o++){var i=st[o];try{"function"==typeof i.then&&i.then(r,Date.now()-f,n,t)}catch(e){}}return r})).catch((function(e){for(var r=0;r<st.length;r++){var o=st[r];try{"function"==typeof o.catch&&o.catch(e,Date.now()-f,n,t)}catch(e){}}throw e}))})},overrideXhr:function(e,t){var n,r=this,o={name:this.name,ignoreHackReg:null==(o=e.api)?void 0:o.ignoreHackReg,send:function(n,o){var i,a,s=Date.now(),c=(((null==e?void 0:e.api)||{}).injectTraceHeader&&(a=(i=I()).host,i=i.pathname,i=(a=r.traceRequestHeader.generate(n.aegisUrl,{},{host:a,pathname:i})||{}).name,a=a.value,i)&&a&&n.setRequestHeader(i,a),n.addEventListener("loadend",(function(){var i,a,f,p,h=n.aegisUrl||"";w(h,e.hostUrl)||"abort"===n.failType||(i="",(n.failType||!n.status||400<=n.status)&&(i=n.failType||"failed"),a=Date.now()-s,f=n.getResponseHeader("content-type")||"",p=j(e,f,h),setTimeout((function(){var s=U(e,{url:h,duration:a,type:p,status:n.status,method:n.aegisMethod||"get"});if("fetch"===p){var f=(null==(f=e.api)?void 0:f.reqHeaders)||[],m=A(n.aegisXhrReqHeader,f,"req"),v=(f=(null==(f=e.api)?void 0:f.resHeaders)||[],n.getAllResponseHeaders().split("\r\n").reduce((function(e,t){return(t=t.split(": "))[0]&&t[1]&&(e[t[0]]=t[1]),e}),{})),y=A(v,f,"res"),w=d(n.aegisXhrReqHeader),E=(f=null==(v=e.api)?void 0:v.apiDetail)?b(o,null==(v=e.api)?void 0:v.reqParamHandler,{url:h}):"",R=f?b(n.response,null==(v=e.api)?void 0:v.resBodyHandler,{url:h}):"";try{!function(e,t,n,r){var o,i,a,s;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,(function(e){var t=e.code;e=e.isErr,null!=r&&r({code:void 0===t?fe:t,isErr:e})}));if("function"==typeof(null==t?void 0:t.retCodeHandler))return a=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,s=i.isErr,null!=r&&r({code:void 0===a?fe:a,isErr:s});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:fe,isErr:!1});"function"==typeof(null==(o=null==t?void 0:t.ret)?void 0:o.join)&&(Te=[].concat(t.ret.map((function(e){return e.toLowerCase()}))));var c=Object.getOwnPropertyNames(e).filter((function(e){return-1!==Te.indexOf(e.toLowerCase())}));if(c.length)return"未知"!==(a=e[c[0]])&&""!==a||(a=fe),null!=r&&r({code:""+a,isErr:0!==a&&"0"!==a&&a!==fe});null!=r&&r({code:fe,isErr:!1})}catch(e){null!=r&&r({code:fe,isErr:!1})}}(n.response,e.api,{url:h,ctx:n,payload:o},(function(e){var n=e.code,a=(e=e.isErr,[i?"AJAX_ERROR: request "+i:"","fetch req url: "+h,"res status: "+(s.status||0),"res duration: "+s.duration+"ms",m,y,"req method: "+(s.method||"GET"),"res retcode: "+n,N(E,"req param"),N(R,"res data")].filter((function(e){return e})).join("\n\n"));s.ret=n,s.isErr=+e,s.payload=o,r.publishNormalLog({msg:a,level:q(!!i,e),code:n,trace:w},t),r.publishSpeed(s,t)}))}catch(e){s.ret=fe,r.publishSpeed(s,t)}}else s.type="static",s.urlQuery=g(h,!0),r.publishSpeed(s,t);n.removeEventListener("abort",c),n.removeEventListener("error",u),n.removeEventListener("timeout",l)}),0))})),function(){n.failType="abort"}),u=function(){n.failType="error"},l=function(){n.failType="timeout"};n.addEventListener("abort",c),n.addEventListener("error",u),n.addEventListener("timeout",l)}};this.hackXHROptions=o,n=this.hackXHROptions,ot.find((function(e){return e.name===n.name}))||(ot.push(n),!rt&&window.XMLHttpRequest&&(ze=window.XMLHttpRequest.prototype.send,Ye=window.XMLHttpRequest.prototype.open,Qe=window.XMLHttpRequest.prototype.setRequestHeader,rt=!0,window.XMLHttpRequest.prototype.open=function(){this.aegisMethod=arguments[0];var e,t=arguments[1];if(it.test(t)&&(t=""+location.origin+t),this.aegisUrl=t,null==(t=null==(e=n.ignoreHackReg)?void 0:e.test)||!t.call(e,this.aegisUrl))if(this.aegisXhrStartTime=Date.now(),this.sendByAegis)Je.isIE()||(this.timeout=5e3);else for(var r=0;r<ot.length;r++){var o=ot[r];try{"function"==typeof o.open&&o.open(this)}catch(e){}}return Ye.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,r;return null!=(t=null==(r=n.ignoreHackReg)?void 0:r.test)&&t.call(r,this.aegisUrl)?Qe.apply(this,arguments):(t=arguments[0],r=arguments[1],this.aegisXhrReqHeader=null!=(e=this.aegisXhrReqHeader)?e:{},-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.aegisXhrReqHeader[t]||(arguments[1]=r),this.aegisXhrReqHeader[t])?void 0:(this.aegisXhrReqHeader[t]=arguments[1],Qe.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=n.ignoreHackReg)?void 0:e.test)&&t.call(e,this.aegisUrl)||this.sendByAegis))for(var r=0;r<ot.length;r++){var o=ot[r];try{"function"==typeof o.send&&o.send(this,arguments[0])}catch(e){}}return ze.apply(this,arguments)}))},publishSpeed:function(e){var t=this;this.$walk((function(n){var r=t.$getConfig(n);"fetch"!==e.type||"function"!=typeof(null==r?void 0:r.urlHandler)?(e.url=g(e.url),n.speedLogPipeline(e)):n.speedLogPipeline(ie(ie({},e),{url:g(r.urlHandler(e.url,e.payload))}))}))},publishNormalLog:function(e){this.$walk((function(t){t.normalLogPipeline(e)}))},destroy:function(){var e,t,n;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(e=this.option.hackXHROptions,-1!==(n=ot.findIndex((function(t){return t.name===e.name}))))&&ot.splice(n,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(n=st.findIndex((function(e){return e.name===t.name}))))&&st.splice(n,1),this.option.override=!1}})),ut={},lt=new Be({name:"reportBridgeSpeed",override:!1,onNewAegis:function(e){this.override||(this.override=!0,this.overrideBridge(e))},publishSpeed:function(e,t){this.$walk((function(n){n===t&&n.speedLogPipeline(e)}))},overrideBridge:function(e){var t=this,n=e.config;n.reportBridgeSpeed&&n.h5Bridge&&n.h5BridgeFunc.length&&n.h5BridgeFunc.forEach((function(r){var o=n.h5Bridge[r];ut[r]=o,n.h5Bridge[r]=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=r[0],s=r[1],c=r[2],u=r[3],l=Date.now();o(a,s,c,(function(r){var o=(i=y(r,n.api)).code,i=i.isErr;o={url:a+"-"+s,name:a+"-"+s,duration:Date.now()-l,type:"bridge",ret:o,isErr:+i},t.publishSpeed(o,e),u(r)}))}}))},unHackBridge:function(e){Object.keys(ut).forEach((function(t){ut[t]&&(e.config.h5Bridge[t]=ut[t])})),ut={}},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}});(wt=et=et||{})[wt.unknown=100]="unknown",wt[wt.wifi=1]="wifi",wt[wt.net2g=2]="net2g",wt[wt.net3g=3]="net3g",wt[wt.net4g=4]="net4g",wt[wt.net5g=5]="net5g",wt[wt.net6g=6]="net6g",(wt=tt=tt||{})[wt.android=1]="android",wt[wt.ios=2]="ios",wt[wt.windows=3]="windows",wt[wt.macos=4]="macos",wt[wt.linux=5]="linux",wt[wt.other=100]="other",(wt=nt=nt||{})[wt.unknown=100]="unknown",wt[wt.normal=0]="normal",wt[wt.weak=1]="weak",wt[wt.disconnected=2]="disconnected";var ft,dt,pt,ht,gt,mt,vt,yt,bt,wt=new Be({name:"device",onNewAegis:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",et.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 e={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},t=Object.keys(e).find((function(t){return e[t].test(navigator.userAgent)}));return t?tt[t]:tt.other},refreshNetworkTypeToBean:function(e){var t=this,n=e.config;n&&("function"==typeof n.getNetworkType?n.getNetworkType:Et)((function(n){et[n]||(n=et.unknown),e.extendBean("netType",n),t.NetworkRefreshTimer=setTimeout((function(){t.refreshNetworkTypeToBean(e),clearTimeout(t.NetworkRefreshTimer)}),1e4)}))},refreshNetworkStatusToBean:function(e){var t,n=this,r=e.config;r&&null!=(t="function"==typeof r.getNetworkStatus?r.getNetworkStatus:t)&&t((function(t){void 0===nt[t]&&(t=nt.unknown),e.extendBean("netStatus",t),n.NetworkStatusRefreshTimer=setTimeout((function(){n.refreshNetworkStatusToBean(e),clearTimeout(n.NetworkStatusRefreshTimer)}),1e4)}))}}),Et=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||fe,0<=(n=String(n).toLowerCase()).indexOf("4g")?et.net4g:0<=n.indexOf("wifi")?et.wifi:0<=n.indexOf("5g")?et.net5g:0<=n.indexOf("6g")?et.net6g:0<=n.indexOf("3g")?et.net3g:0<=n.indexOf("2g")?et.net2g:et.unknown))},Rt=window.WebSocket,Ot=[],St={construct:function(e,t){var n=new e(t[0],t[1]);return n.originSend=n.send,n.addEventListener("error",(function(e){var t=(e=(null==e?void 0:e.currentTarget)||{}).url,n=e.readyState;null!=Ot&&Ot.forEach((function(e){null!=(e=e.onErr)&&e({msg:"无法获知具体错误信息，需在浏览器控制台查看！",readyState:n,connectUrl:t})}))})),Object.defineProperty(n,"send",{get:function(){return function(e){null!=(t=n.originSend)&&t.call(n,e);var t=n.readyState,r=(e=WebSocket.OPEN,WebSocket.CLOSED),o=WebSocket.CONNECTING,i=WebSocket.CLOSING;if(t!==e){var a={readyState:t,connectUrl:n.url};switch(t){case r:Ot.forEach((function(e){null!=(e=e.sendErr)&&e(ie({msg:"消息发送失败，连接已关闭！"},a))}));break;case o:Ot.forEach((function(e){(0,e.sendErr)(ie({msg:"消息发送失败，正在连接中！"},a))}));break;case i:Ot.forEach((function(e){(0,e.sendErr)(ie({msg:"消息发送失败，连接正在关闭！"},a))}))}}}}}),n}},Tt=new Be({name:"onError"}),xt=Tt=new Be({name:"onError",onNewAegis:function(e){this.startListen(e)},startListen:function(e){var t,n,r,o,a=function(t){var n,r=t&&Pe(t.reason);r&&c.publishErrorLog({msg:"PROMISE_ERROR: "+r,errorMsg:null==(n=null==(t=(null==(n=t.reason)?void 0:n.message)||(null==(n=t.reason)?void 0:n.errMsg)||r)?void 0:t.slice)?void 0:n.call(t,0,150),level:we.PROMISE_ERROR},e)},s=function(t){var n;if(t=(null==t?void 0:t.target)||(null==t?void 0:t.srcElement)){var r=t.src||t.href||"";if(t=void 0===(t=t.tagName)?"script":t,!(w(n=r,e.config.hostUrl)||-1<window.location.href.indexOf(n))){var o={msg:t+" load fail: "+r,level:we.INFO};if(/\.js$/.test(r))o.level=we.SCRIPT_ERROR;else if(/\.css$/.test(r))o.level=we.CSS_ERROR;else switch(t.toLowerCase()){case"script":o.level=we.SCRIPT_ERROR;break;case"link":o.level=we.CSS_ERROR;break;case"img":o.level=we.IMAGE_ERROR;break;case"audio":case"video":o.level=we.MEDIA_ERROR;break;default:return}c.publishErrorLog(o,e)}}},c=this,u=window.onerror;window.onerror=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,o=Pe(t[0]);"string"!=typeof(r=o)||!r||ce.some((function(e){return-1<r.indexOf(e)}))||se.some((function(e){return-1<r.indexOf(e)}))||c.publishErrorLog({msg:(o||"")+" @ ("+(Pe(t[1])||"")+":"+(t[2]||0)+":"+(t[3]||0)+")\n          \n"+Pe(t[4]||""),level:we.ERROR},e),null!=u&&u.call.apply(u,i([window],t))},window.addEventListener("unhandledrejection",a),window.document.addEventListener("error",s,!0),e.lifeCycle.on("destroy",(function(){0===Tt.countInstance()&&(window.document.removeEventListener("unhandledrejection",a),window.document.removeEventListener("error",s,!0))})),e.config.websocketHack&&(t={key:e.config.id+"-"+this.name,onErr:function(t){var n;null!=(n=c.publishWsErrorLog)&&n.call(c,t,e)},sendErr:function(t){var n;null!=(n=c.publishWsErrorLog)&&n.call(c,t,e)}},this.hackWebsocketConfig=t,t=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(n=window.WebSocket,window&&!n.isHack&&(r=new Proxy(WebSocket,St),n.isHack=!0,window.WebSocket=r),o=t,Ot.find((function(e){return e.key===o.key}))||o&&Ot.push(o))},publishErrorLog:function(e,t){this.$walk((function(n){n===t&&n.normalLogPipeline(e)}))},publishWsErrorLog:function(e,t){var n=e.connectUrl,r=e.msg;e=e.readyState,this.publishErrorLog({msg:"WEBSOCKET_ERROR: \n              connect: "+n+"\n              readyState: "+e+"\n              msg: "+r,level:we.WEBSOCKET_ERROR},t)},destroy:function(){var e,t;this.option.publishErrorLog=function(){},this.option.hackWebsocketConfig&&(e=this.option.hackWebsocketConfig,window.WebSocket=Rt,-1!==(t=Ot.findIndex((function(t){return t.key===e.key}))))&&Ot.splice(t,1)}}),Pt=(new Be({name:"pagePerformance"}),3),Lt=new Be({name:"pagePerformance",performanceMap:{},onNewAegis:function(e){L()&&(ft?this.publish(ft,e):this.startCalcPerformance(e))},publish:function(e,t){var n=this;this.$walk((function(r){r===t&&r.sendPipeline([function(e,t){var o,i=[];for(o in e)i.push(o+"="+e[o]);var a,s=n.$getConfig(r);if(s)return a=-1===(null==(a=r.config.performanceUrl)?void 0:a.indexOf("?"))?"?":"&","function"==typeof s.urlHandler?t({url:r.config.performanceUrl+a+i.join("&")+"&from="+(encodeURIComponent(s.urlHandler())||window.location.href),beanFilter:["from"],type:Ee.PERFORMANCE,log:e}):t({url:r.config.performanceUrl+a+i.join("&"),type:Ee.PERFORMANCE,log:e})}],Ee.PERFORMANCE)(ie({},e))}))},startCalcPerformance:function(e){var t=this;try{this.getFirstScreenTiming(e,(function(n){var r=performance.timing;r&&(ft={dnsLookup:H(r.domainLookupEnd-r.domainLookupStart),tcp:H(r.connectEnd-r.connectStart),ssl:H(0===r.secureConnectionStart?0:r.requestStart-r.secureConnectionStart),ttfb:H(r.responseStart-r.requestStart),contentDownload:H(r.responseEnd-r.responseStart),domParse:H(r.domInteractive-r.domLoading,0,15e3,1070),resourceDownload:H(r.loadEventStart-r.domInteractive,0,15e3,1070),firstScreenTiming:H(Math.floor(n),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(r=(n=r.extraPerformanceData).engineInit,n=n.bundleLoad,ft=ie(ie({},ft),{engineInit:H(r,0,1e4),bundleLoad:H(n,0,1e4)})),t.publish(ft,e))}))}catch(e){}},getFirstScreenTiming:function(e,t){var n=this;e.lifeCycle.on("destroy",(function(){f&&clearTimeout(f)}));var r,o=this,i=["script","style","link","br"],a=[],s={},c=(-1<(null==(u=null==(u=window.PerformanceObserver)?void 0:u.supportedEntryTypes)?void 0:u.indexOf("paint"))&&(r=new PerformanceObserver((function(o){o.getEntries().forEach((function(o){var i;"paint"===o.entryType&&"first-contentful-paint"===o.name&&0<(i=document.querySelectorAll("[AEGIS-FIRST-SCREEN-TIMING]")).length&&(n.setFirstScreenInfo(e,o.startTime,i[0],i),null!=t&&t(o.startTime),c.disconnect(),r.disconnect())}))}))).observe({entryTypes:["paint"]}),new MutationObserver((function(e){var t={roots:[],ignores:[],rootsDomNum:[],time:performance.now()};e.forEach((function(e){e&&e.addedNodes&&Array.prototype.slice.call(e.addedNodes).forEach((function(e){o.isEleInArray(e,t.ignores)?t.ignores.push(e):1===e.nodeType&&e.hasAttribute("AEGIS-FIRST-SCREEN-TIMING")?(Object.prototype.hasOwnProperty.apply(s,[t.time])||(s[t.time]=[]),s[t.time].push(e)):1===e.nodeType&&(o.hasAncestorOrSelfWithAttribute(e,"AEGIS-IGNORE-FIRST-SCREEN-TIMING")?t.ignores.push(e):-1!==i.indexOf(e.nodeName.toLocaleLowerCase())||o.isEleInArray(e,t.roots)||(t.roots.push(e),t.rootsDomNum.push(o.walkAndCount(e)||0)))}))})),t.roots.length&&a.push(t)})));c.observe(document,{childList:!0,subtree:!0});var u,l=function(i){(i=void 0===i?0:i)||(u=0,(p=Object.keys(s)).length?(i=Math.max.apply(null,p),n.setFirstScreenInfo(e,i,null==(p=s[i])?void 0:p[0],s)):a.forEach((function(t){for(var r=0;r<t.roots.length;r++)t.rootsDomNum[r]>u&&o.isInFirstScreen(t.roots[r])&&(u=t.rootsDomNum[r],i=t.time,n.setFirstScreenInfo(e,i,t.roots[r]))})),a.length=0,Object.keys(s).forEach((function(e){s[e]=s[e].map((function(e){var t={tagName:e.tagName},n=e.attributes;if(!n)return e;for(var r=0;r<n.length;r++){var o=n[r];o.name&&(t[o.name]=e.getAttribute(o.name))}return t}))})));var u,d=(p=performance.timing).domInteractive-p.domLoading,p=p.loadEventStart-p.domInteractive,h=i;f=null;for(var g=0,m=[d,p,h];g<m.length;g++)if(m[g]<=0&&0<Pt){f=setTimeout((function(){return l(h)}),3e3);break}f?--Pt:(c.disconnect(),null!=r&&r.disconnect(),null!=t&&t(i))},f=setTimeout((function(){return l()}),3e3)},setFirstScreenInfo:function(e,t,n,r){var o;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!=typeof(null==(o=e.config)?void 0:o.pagePerformance)||null!=(o=e.config.pagePerformance)&&o.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},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 r=0;r<n.length;r++)1===n[r].nodeType&&n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING")||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=e;n&&n!==document.body;){if(n.hasAttribute(t))return!0;n=n.parentElement}return!1}});mt={passive:!0,capture:!0},vt=new Date,yt=function(e){var t,n,r,o,i=function(){D(n,r),o()},a=function(){o()};e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,o=function(){removeEventListener("pointerup",i,mt),removeEventListener("pointercancel",a,mt)},addEventListener("pointerup",i,mt),addEventListener("pointercancel",a,mt)):D(t,e))},bt="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",(function e(t){"hidden"===document.visibilityState&&(bt=t.timeStamp,removeEventListener("visibilitychange",e,!0))}),!0),_(),self.webVitals={firstInputPolyfill:function(e){gt.push(e),M()},resetFirstInputPolyfill:_,get firstHiddenTime(){return bt}};var kt,Ct,It,At,Nt,jt,qt=-1,Ut=function(e){addEventListener("pageshow",(function(t){t.persisted&&(qt=t.timeStamp,e(t))}),!0)},Ht=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},_t=function(){var e=Ht();return e&&e.activationStart||0},Dt=-1,Mt=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Ft=function(e){"hidden"===document.visibilityState&&-1<Dt&&(Dt="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("visibilitychange",Ft,!0),removeEventListener("prerenderingchange",Ft,!0))},Bt=function(){addEventListener("visibilitychange",Ft,!0),addEventListener("prerenderingchange",Ft,!0)},Wt=[1800,3e3],Gt=[.1,.25],Xt={passive:!0,capture:!0},Vt=new Date,$t=function(e,t){kt||(kt=t,Ct=e,It=new Date,Z(removeEventListener),Y())},Jt=[100,300],Kt=[2500,4e3],zt={},Yt=(new Be({name:"webVitals"}),{FCP:-1,LCP:-1,FID:-1,CLS:-1}),Qt=new Be({name:"webVitals",onNewAegis:function(e){if(L()&&"function"==typeof window.PerformanceObserver&&"function"==typeof performance.getEntriesByName)try{z(te),i=te,a={},K((function(){var e,t,n=function(t){(t=t[t.length-1])&&t.startTime<r.firstHiddenTime&&(o.value=Math.max(t.startTime-_t(),0),o.entries=[t],e())},r=J(),o=B("LCP"),s=W("largest-contentful-paint",n);s&&(e=G(i,o,Kt,a.reportAllChanges),t=$((function(){zt[o.id]||(n(s.takeRecords()),s.disconnect(),zt[o.id]=!0,e(!0))})),["keydown","click"].forEach((function(e){addEventListener(e,(function(){return setTimeout(t,0)}),!0)})),V(t),Ut((function(t){o=B("LCP"),e=G(i,o,Kt,a.reportAllChanges),X((function(){o.value=performance.now()-t.timeStamp,zt[o.id]=!0,e(!0)}))})))})),r=te,o={},K((function(){var e=function(e){e.startTime<n.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),s(!0))},t=function(t){t.forEach(e)},n=J(),i=B("FID"),a=W("first-input",t),s=G(r,i,Jt,o.reportAllChanges);a&&V($((function(){t(a.takeRecords()),a.disconnect()}))),a&&Ut((function(){i=B("FID"),s=G(r,i,Jt,o.reportAllChanges),At=[],Ct=-1,kt=null,Z(addEventListener),At.push(e),Y()}))})),t=te,n={},z($((function(){var e,r=function(t){t.forEach((function(e){var t,n;e.hadRecentInput||(t=a[0],n=a[a.length-1],i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]))})),i>o.value&&(o.value=i,o.entries=a,e())},o=B("CLS",0),i=0,a=[],s=W("layout-shift",r);s&&(e=G(t,o,Gt,n.reportAllChanges),V((function(){r(s.takeRecords()),e(!0)})),Ut((function(){o=B("CLS",i=0),e=G(t,o,Gt,n.reportAllChanges),X((function(){return e()}))})),setTimeout(e,0))}))),ee(this.publish.bind(this,e),{once:!0,delay:{visibilitychange:10}})}catch(e){}var t,n,r,o,i,a},publish:function(e){this.$walk((function(t){var n;t===e&&null!=(n=t.sendPipeline)&&n.call(t,[function(e,n){var r,o=[];for(r in e)o.push(r+"="+e[r]);var i=-1===(null==(i=null==(i=t.config)?void 0:i.performanceUrl)?void 0:i.indexOf("?"))?"?":"&";n({url:t.config.webVitalsUrl+i+o.join("&"),type:Ee.VITALS,log:e,sendBeacon:!0})}],Ee.VITALS)(ie({},Yt))}))},destroy:function(){this.option.publish=function(){}}}),Zt=(new Be({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),en=new Be({name:"spa",originFireUrl:"",onNewAegis:function(e){var t=this;history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),e.config.spa&&this.sendPv(e),Zt.forEach((function(n){return window.addEventListener(n,(function(){return t.sendPv.call(t,e)}))}))},wr:function(e){var t=history[e],n="__"+e+"__hasWrittenByTamSpa";return"function"==typeof t&&!history[n]&&(Object.defineProperty(history,n,{value:!0,enumerable:!1}),function(){var n=t.apply(this,arguments),r=null;return"function"==typeof Event?r=new Event(e):(r=document.createEvent("HTMLEvents")).initEvent(e,!1,!0),window.dispatchEvent(r),n})},sendPv:function(e){var t=this;setTimeout((function(){var n=location.pathname+location.hash+e.config.id;t.$walk((function(r){var o;r===e&&(o=r.config.pvUrl)&&n&&n!==t.originFireUrl&&(r.sendPipeline([function(e,t){t({url:""+o,type:Ee.PV})}],Ee.PV)(null),t.originFireUrl=n)}))}),0)},destroy:function(){this.option.sendPv=function(){}}});function tn(e){var t,n,r,o,i=Nt.call(this,e)||this;i.sendNow=!1,i.isReportReady=!1,i.reportRequestQueue=[],i.speedLogPipeline=x([E(i),(o=i.config,function(e,t){var n,r,i,a="number"==typeof o.repeat?o.repeat:60;!o.speedSample||a<=0?t(e):(n=(null==o?void 0:o.id)||"0",r=Ue[n]||{},Array.isArray(e)?(i=e.filter((function(e){var t=!r[e.url]||r[e.url]<a;return t?(r[e.url]=1+~~r[e.url],Ue[n]=r):qe[n]||He(n),t}))).length&&t(i):!r[e.url]||r[e.url]<a?(r[e.url]=1+~~r[e.url],Ue[n]=r,t(e)):qe[n]||He(n))}),(r=i,function(e,t){Et((function(n){r.extendBean("netType",n),t(e)}))}),function(e,t){null!=(n=i.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=i.config.beforeReportSpeed;if((e="function"==typeof r?e.filter((function(e){return!1!==r(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 i.sendPipeline([function(e,t){var n,r,o,a;t({type:Ee.SPEED,url:""+i.config.speedUrl,method:"post",data:(t=e,n=ie(ie({},i.bean),{from:i.getCurrentPageUrl()}),o={fetch:[],static:[],bridge:[]},a=new FormData,Array.isArray(t)?t.forEach((function(e){var t=Ge(e);o[e.type].push(t)})):(r=Ge(t),o[t.type].push(r)),a.append("payload",Le(ie({duration:o},n))),a),log:e})}],Ee.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]||""),i.init(e),i.extendBean("sessionId",tn.sessionID),i.extendBean("from",i.getCurrentPageUrl()),"undefined"!=typeof document&&i.extendBean("referer",encodeURIComponent(document.referrer||"")),e.ext1&&i.extendBean("ext1",encodeURIComponent(e.ext1)),e.ext2&&i.extendBean("ext2",encodeURIComponent(e.ext2)),e.ext3&&i.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"),i.sendSDKError(e)}return i}oe(jt=tn,Fe=Nt=Fe),jt.prototype=null===Fe?Object.create(Fe):(ne.prototype=Fe.prototype,new ne),tn.prototype.getBean=function(e){var t=this;return void 0===e&&(e=[]),""+Object.getOwnPropertyNames(this.bean).filter((function(t){return-1===e.indexOf(t)})).map((function(e){return"from"===e?"from="+t.getCurrentPageUrl():e+"="+t.bean[e]})).join("&")},tn.prototype.getCurrentPageUrl=function(){var e=this.config.pageUrl||location.href;return e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e)},tn.prototype.ready=function(){var e=this;(function t(){var n,r,o,i;e.reportRequestQueue.length&&(n=e.reportRequestQueue.splice(0,1)[0],r=n.options,o=n.success,i=n.fail,e.$request(r,(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return null==o?void 0:o.apply(r,e)}finally{t()}}),(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return null==i?void 0:i.apply(r,e)}finally{t()}})))})(),this.isReportReady=!0},tn.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})},tn.prototype.$request=function(e,t,n){var r,o,i,a;if(e&&"string"==typeof e.url&&""!==e.url&&this.bean.id)return a=e.url,!1!==e.addBean&&(a=function(t,n){var r,o,i,a=t,s=e.beanFilter||[];for(r in n)-1===s.indexOf(r)&&((i=(o=new RegExp("([?&])"+r+"(=([^&]*))?(?=&|$)")).exec(a))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(a=a.replace(o,"$1"+r+"="+n[r])):(i=-1<a.indexOf("?")?"&":"?",a+=i+r+"="+n[r]));return a}(a,ie(ie({},this.bean),{from:this.getCurrentPageUrl()}))),e.url=a,a=e.method||"get",o=this.config.onBeforeRequest,(e=o?o(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):((r=new XMLHttpRequest).sendByAegis=!0,r.addEventListener("readystatechange",(function(){4===r.readyState&&(400<=r.status||0===r.status?null!=n&&n(r.response):null!=t&&t(r.response))})),"get"===a.toLocaleLowerCase()?(r.open("get",(o=e.url,i=e.data,"string"!=typeof o?"":"object"==typeof i&&i?(a=Object.getOwnPropertyNames(i).map((function(e){var t=i[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))})).join("&").replace(/eval/gi,"evaI"),o+(-1===o.indexOf("?")?"?":"&")+a):o)),r.send()):(r.open("post",e.url),e.contentType&&r.setRequestHeader("Content-Type",e.contentType),"string"==typeof e.data&&(e.data=e.data.replace(/eval/gi,"evaI")),r.send(e.data)))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},tn.prototype.publishPluginsLogs=function(){var e=tn.installedPlugins.find((function(e){return"reportAssetSpeed"===e.name}));null!=e&&e.option.collectNotReportedLog(this)},tn.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},tn.sessionID="session-"+Date.now(),Fe=tn,new Be({name:"ie"}),new Be({name:"onClose"});var nn=new Be({name:"onClose",onNewAegis:function(e){var t,n=this;Je.desktop()?(t=window.onunload,window.onunload=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.publishNotReportedLog(e),null!=t&&t.call.apply(t,i([window],r))}):ee(this.publishNotReportedLog.bind(this,e),{once:!0})},publishNotReportedLog:function(e){var t=this;this.$walk((function(n){n===e&&(n.sendNow=!0,n.publishPluginsLogs(),t.publishThrottlePipeLogs(n))}))},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.eventPipeline([]),null!=e&&e.customTimePipeline([]),null!=e&&e.normalLogPipeline([])}});return new Be({name:"aid"}),Fe.use(xt),Fe.use(ct),Fe.use(Ve),Fe.use(Lt),Fe.use(Qt),Fe.use(We),Fe.use(wt),Fe.use(en),Fe.use(nn),Fe.use(lt),Fe}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=n(920),t=n.n(e);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=["The user aborted a request","127.0.0.1","localhost.work.weixin.qq.com","PROMISE_ERROR: undefined","Script error.","Redirected when going","res status: 0","[force-log]","chrome-extension://"],i=["Failed to fetch","Request aborted","Network Error",/timeout of \d+ms exceeded/,/Loading chunk \d+ failed/,"LINK load fail","SCRIPT load fail"];function a(e,t){return t.some((function(t){return"string"==typeof t?e.includes(t):t.test(e)}))}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,u,l,f=(l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e}({id:"LsKWKzttmYsIvYlKTn"},window.aegisOptions),new(t())(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}({reportApiSpeed:!0,reportAssetSpeed:!0,env:t().environment.production,version:["bootstrap-aegis",1724067222329,(null==="master"?void 0:"master".slice(0,16))||"unknown",(null==="b7023bd48a45e0c62935b2cf0d04cab7c0b2b732"?void 0:"b7023bd48a45e0c62935b2cf0d04cab7c0b2b732".slice(0,9))||"unknown",(u=window.__NUXT__,u?u.serverRendered?"ssr":(null===(c=u.config)||void 0===c?void 0:c.isHWeb)?"hweb":"csr":"other")].join(":"),beforeRequest:function(e){return("log"!==e.logType||(!location.href.includes("/hweb-prefetch")||!a(e.logs.msg,i))&&!a(e.logs.msg,o))&&e}},l)));window.aegis=f}()}();