1var cxMonitor=function(e){"use strict";let t={enable:!0,env:"prod",reportUrl:"https://fd-monitor-server.caixin.com/app-api/report",batchSize:10,delay:800,maxActions:20,maxUrlLength:2048,minUALength:20,maxReqArgs:1048576,maxResData:1048576,ignoreFiles:["www.googletagmanager.com/gtag/js"]};["localhost"].some(e=>location.host.includes(e))&&(t.enable=!1);const n=e=>{t=Object.assign(Object.assign({},t),e)},r=()=>Object.assign({},t),s={},a={},o=()=>(Object.keys(a).forEach(e=>{s[e]=a[e]()}),s),i=window,c="Content-Type",l="application/json",u="SUCCESS",p="ERROR",m=i.fetch,g="error",f="unhandledrejection",h="load",d=Date.now()+"-"+Math.random().toString(36).slice(2,10),v="performance",y=v in i&&"PerformanceObserver"in i,T="rcErr",b=e=>{console.warn("sdk inner error",e)},w=e=>{try{return e()}catch(e){b(e)}},E=e=>(t,n,r)=>{const s=function(t){w(()=>n.call(e,t))};return e.addEventListener(t,s,r),()=>{e.removeEventListener(t,s,r)}},D=E(i),S=e=>JSON.stringify(e),k=e=>e?e.replace(/(\.js)(\?.*)/g,"$1"):"",R=e=>{if(!e)return"";if((e=e.replace(/(\.js)(\?[^\:]*)/g,"$1")).length>1e3){const t=e.split("\n");1==t.length?e=e.slice(0,1e3):(t.map(e=>e.length>300?e.slice(0,300)+"[...]":e),e=t.join("\n"))}return e},O=e=>{try{const t=new URL(e),n="callback",r="replaced_";return t.searchParams.has(n)&&t.searchParams.set(n,r+n+"_name"),t.searchParams.has("_")&&t.searchParams.set("_",r+"timestamp"),t.href}catch(t){return e}},P=(e,t)=>navigator.userAgent.length<r().minUALength||(!!(e=>0===(null!=e?e:"").trim().length)(e)||(!!(e=>{const t=!"".includes("caixin"),n=!(null!=e?e:"").split("\n").pop().includes("caixin.com");return t&&n})(e)||!!((e,t)=>r().ignoreFiles.some(n=>(null!=e?e:"").split("\n").pop().includes(n)||(null!=t?t:"").includes(n)))(e,t)));const x={},A=(e,t)=>{x[e]=t},C=(e,...t)=>{const n=x[e];if(n)return w(()=>n(...t))},L=[],U=(e,t)=>({actionType:e,actionData:Object.assign({},t),pageUrl:location.href,timestamp:Date.now(),triggerTimes:1}),j=e=>{const{maxActions:t,enable:n}=r();if(!n)return[];L.push(e);const s=L.length;return s>t&&L.splice(0,s-t),L},q=e=>{const t=U("error",e),n=L[L.length-1];return n&&"error"===n.actionType&&e.stack===n.actionData.stack?(n.triggerTimes++,n.totalTime=t.timestamp-n.timestamp):j(t),L},I=e=>(j(U("request",e)),L),M=(e,t,n)=>{const r=location.href,s=history.state;return r!==t&&s!==n&&j(U("navigation",{type:"pushState",from:{url:r,state:s},to:{url:t,state:n}})),L},N=function(e){const{tagName:t,className:n,outerHTML:r}=e.target;var s;(e=>{const t=U("event",e),n=L[L.length-1];if(n&&"event"===n.actionType){const r=n.actionData;e.eventName===r.eventName&&e.target===r.target&&e.isTrusted===r.isTrusted?(n.triggerTimes++,n.totalTime=t.timestamp-n.timestamp):j(t)}else j(t)})({eventName:e.type,isTrusted:e.isTrusted,target:(s=(null==r?void 0:r.substring(0,127))||"",s?s.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"[SCRIPT_REMOVED]").replace(/<iframe\b[^<]*(?:(?!<\/iframe>)<[^<]*)*<\/iframe>/gi,"[IFRAME_REMOVED]").replace(/javascript:/gi,"[JAVASCRIPT_REMOVED]").replace(/on\w+\s*=/gi,"[EVENT_HANDLER_REMOVED]"):""),tagName:t,className:n})};const _=()=>{const e={ua:navigator.userAgent,resolution:screen.availWidth+"x"+screen.availHeight,viewport:innerWidth+"x"+innerHeight,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,language:navigator.language};if("deviceMemory"in navigator&&(e.deviceMemory=`${navigator.deviceMemory}GB`),"hardwareConcurrency"in navigator&&(e.cpuCores=navigator.hardwareConcurrency),"connection"in navigator){const t=navigator.connection;e.networkType=t.effectiveType||"unknown"}return e},z=[];let F=null;function H(e){w(()=>{const t=r();z.push(e),z.length>=t.batchSize?V():function(){F&&clearTimeout(F);const e=r();F=setTimeout(()=>{V()},e.delay)}()})}function V(){if(F&&(clearTimeout(F),F=null),0===z.length)return;const e=r(),t=z.splice(0,e.batchSize);(async function(e){const{env:t,reportUrl:s}=r();if(!function(e){if(!e||e.length>r().maxUrlLength)return!1;try{return new URL(e),!0}catch(e){return!1}}(s))return void b(new Error("Invalid report server URL"));try{const n={reports:e,batchInfo:{env:t,count:e.length,sendTime:Date.now(),sessionId:d,sdkVersion:"1.0.0"}};await m(s,{method:"POST",headers:{[c]:l,"Page-Url":location.href},body:S(n),credentials:"include",keepalive:!0})}catch(e){n({enable:!1}),b(e)}}
1)(t).catch(e=>{b(e),z.unshift(...t)})}function G(e,t,n){try{if(!r().enable)return;const s={type:e,detail:t,pageUrl:location.href,deviceInfo:_(),customInfo:o(),performance:C(v),timestamp:Date.now()};n&&(s.actions=n.slice(),n.length=0),H(s)}catch(e){b(e)}}function J(e,t){var n;e.url!==r().reportUrl&&(e.method=null===(n=null==e?void 0:e.method)||void 0===n?void 0:n.toUpperCase(),G("request",e,t))}const W=document,$=e=>{const{maxReqArgs:t}=r(),{reqArgs:n}=e;n&&n.length>t&&(e.reqArgs="[maxsize]"+n.substring(0,t))},B=e=>{const{maxResData:t}=r(),{resData:n}=e;n&&n.length>t&&(e.resData="[maxsize]"+n.substring(0,t))},X=(e,t)=>{const n=Object.getOwnPropertyDescriptor(e,t);return 0==(null==n?void 0:n.configurable)&&0==(null==n?void 0:n.writable)},Z=(e,t,n)=>Object.defineProperty(e,t,n),K=()=>{const e=i.XMLHttpRequest.prototype,t=e.open;e.open=function(e,n,r=!0,s=null,a=null){this._method=e,t.call(this,e,n,r,s,a)};const n=e.send;e.send=function(...e){const t=Date.now();n.apply(this,e);const r=R((new Error).stack);E(this)(h,()=>{var n;const{responseURL:s,status:a,statusText:o,response:i}=this,m={url:s,reqType:"XMLHttpRequest",method:this._method,reqArgs:S(e),status:a,statusText:o,stack:r,elapsedTime:Date.now()-t};if(this.status>=400){if(P(r))return;m.resType=p,$(m),J(m,I(m))}else(null===(n=this.getResponseHeader(c))||void 0===n?void 0:n.includes(l))&&w(()=>{const e=JSON.parse(i);m.resType=u,m.resData=S(e),B(m),I(m)})})}},Q=(e,t)=>{try{const n=String(t);if(!n.includes("callback="))return;const r=(e=>{e.startsWith("//")&&(e="http:"+e);const t=new URL(e).searchParams,n={};for(const[e,r]of t)n[e]=r;return n})(n),s=null==r?void 0:r.callback,a=i[s];if("function"==typeof a){const t=Date.now(),o=R((new Error).stack),c={url:O(n),reqType:"JSONP",reqArgs:S(r),method:"GET",stack:o};E(e)(g,function(){P(o)||(c.resType=p,c.elapsedTime=Date.now()-t,$(c),J(c,I(c)))}),i[s]=function(...e){a.apply(this,e);try{c.elapsedTime=Date.now()-t,c.resData=S(e),c.resType=u,B(c),I(c)}catch(e){b(e)}}}}catch(e){b(e)}},Y=()=>{if(X(W,"createElement"))return;const e=W.createElement;Z(W,"createElement",{value:function(t,n){const r=e.call(W,t,n);try{"script"==t.toLowerCase()&&Z(r,"src",{get(){return this.getAttribute("src")},set(e){this.setAttribute("src",e),Q(r,e)}})}catch(e){b(e)}return r}})};n({enableResource:!0});const ee=[];n({enablePerformance:!0});const te={},ne=()=>{if(r().enablePerformance&&y)return function(){const e=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{"first-paint"===e.name?te.FP=e.startTime:"first-contentful-paint"===e.name&&(te.FCP=e.startTime)})});w(()=>e.observe({entryTypes:["paint"]}))}(),function(){const e=new PerformanceObserver(e=>{const t=e.getEntries();te.LCP=t[t.length-1].startTime});w(()=>e.observe({entryTypes:["largest-contentful-paint"]}))}(),function(){let e=0;const t=new PerformanceObserver(t=>{t.getEntries().forEach(t=>{t.hadRecentInput||(e+=t.value)}),te.CLS=e});w(()=>t.observe({entryTypes:["layout-shift"]}))}(),function(){const e=new PerformanceObserver(e=>{e.getEntries().forEach(e=>{if("first-input"===e.entryType){te.FID=e.processingStart-e.startTime}})});w(()=>e.observe({entryTypes:["first-input"]}))}(),function(){if(performance.timing){const e=performance.timing;te.TTFB=e.responseStart-e.navigationStart}}(),{metrics:S(te),originData:S(performance)}};const re=r();return re.enable&&((()=>{const e=E(document);e("DOMContentLoaded",N),e("click",N),e("change",N),D("load",N),D("popstate",N);const t=history.pushState;history.pushState=function(e,n,r){w(()=>M(0,r,e)),t.call(this,e,n,r)};const n=history.replaceState;history.replaceState=function(e,t,r){w(()=>M(0,r,e)),n.call(this,e,t,r)},A(T,q)})(),D(g,e=>{var t,n;const r=null===(t=e.error)||void 0===t?void 0:t.stack,s=e.filename;if(P(r,s))return;const a={errorType:g,filename:k(s),lineno:e.lineno||0,message:(null===(n=e.error)||void 0===n?void 0:n.message)||e.message||"Unknown error",stack:R(r)};G("error",a,C(T,a))}),D(f,e=>{const t=e.reason;if(P(null==t?void 0:t.stack))return;const n={errorType:f,message:(null==t?void 0:t.message)||String(t),stack:R(null==t?void 0:t.stack)};G("error",n,C(T,n))}),X(i,"fetch")||"function"!=typeof m||Z(i,"fetch",{value:function(...e){var t;const n=Date.now(),r=m.call(i,...e);try{const s=R((new Error).stack),a={reqType:"fetch",method:(null===(t=e[1])||void 0===t?void 0:t.method)||"GET",reqArgs:S(e),stack:s};r.then(e=>(w(()=>{var t,r;const o=e.clone(),{url:i,status:m,statusText:g}=o;if(a.url=i,a.status=m,a.statusText=g,a.elapsedTime=Date.now()-n,o.status>=400){if(P(s))return;a.resType=p,$(a),J(a,I(a))}else o.ok&&(null===(r=null===(t=o.headers)||void 0===t?void 0:t.get(c))||void 0===r?void 0:r.includes(l))&&o.json().then(e=>{a.resType=u,a.resData=S(e),B(a),I(a)}).catch(e=>{b(e)})}),e))}catch(e){b(e)}return r}}),K(),Y(),re.enableResource&&y&&(function(){const e=new PerformanceObserver(e=>{const t=e.getEntries().map(e=>({name:e.name,initiatorType:e.initiatorType||"unknown",responseStatus:e.responseStatus||0,duration:e.duration,transferSize:e.transferSize||0})).filter(e=>"fetch"!==e.initiatorType&&("script"!==e.initiatorType||-1===e.name.indexOf("callback"))&&(e.responseStatus>=400||void 0));ee.push(...t)});w(()=>e.observe({entryTypes:["resource"]}))}(),D(h,()=>{setTimeout(()=>{r().enableResource&&ee.length>0&&G("resource",ee)},100)})),re.enablePerformance&&A(v,ne)),e.getConfig=r,e.getCustomInfo=o,e.setConfig=n,e.setCustomInfo=(e,t)=>{s[e]=t},e.setCustomInfoGetter=(e,t)=>{a[e]=t},e}({});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.