1import{a as W}from"./chunk-KLPWIIYY.js";import{e as V}from"./chunk-BZDLIHYO.js";import"./chunk-4A7G3DCQ.js";import{a as A}from"./chunk-YJ3ZJJNG.js";import{a as j,b as F,c as I,d as H,e as M,h as P,i as L,j as z,k as B}from"./chunk-HE4QFQES.js";import"./chunk-DC5EKV2O.js";import"./chunk-7K3JLPJW.js";import{J as y}from"./chunk-GAMMKM7I.js";import{P as E,V as b,W as g,a as C,d as O,f as U,w}from"./chunk-C2FQB64K.js";import{a as d}from"./chunk-6F4HVVOU.js";var Q=/([a-z0-9]+)$/i;function q(e){if(!e)return;let r=e.match(Q);if(r)return r[1]}var Z=/^\n+|\n+$/g,G=65530;function K(e){return x(e).replace(Z,"")}function x(e){var r;if(e.length>100){var t=e.length-100;r=e.slice(0,50).join(` 2`),r+=` 3< ...truncated `+t+` lines... > 4`,r+=e.slice(-50).join(` 5`)}else r=e.join(` 6`);return r}function D(e){return e.length>G?e.substr(0,G):e}function N(e){if(typeof e!="string")return"";let r=y(e),t=y(U);return r===t?"<inline>":r}var T=!1;function k(e){var r=null;try{if(r=ee(e),r)return r}catch(t){if(T)throw t}try{if(r=se(e),r)return r}catch(t){if(T)throw t}try{if(r=ae(e),r)return r}catch(t){if(T)throw t}return{mode:"failed",stackString:"",frames:[]}}function ee(e){if(!e.stack)return null;var r=e.stack.split(` 7`).reduce(re,{frames:[],stackLines:[],wrapperSeen:!1});return r.frames.length?{mode:"stack",name:e.name||_(e),message:e.message,stackString:K(r.stackLines),frames:r.frames}:null}function re(e,r){let t=te(r);if(!t)return e.stackLines.push(r),e;if(ne(t.func)&&(e.wrapperSeen=!0),!e.wrapperSeen){let s=N(t.url);s!==t.url&&(r=r.replace(t.url,s),t.url=s),e.stackLines.push(r),e.frames.push(t)}return e}function te(e){var r=e.match(M);if(r||(r=e.match(H)),r)return{url:r[2],func:r[1]!=="Anonymous function"&&r[1]!=="global code"&&r[1]||null,line:+r[3],column:r[4]?+r[4]:null};if(e.match(F)||e.match(I)||e==="anonymous")return{func:"evaluated code"}}function se(e){if(!("line"in e))return null;var r=e.name||_(e);if(!e.sourceURL)return{mode:"sourceline",name:r,message:e.message,stackString:r+": "+e.message+` 8 in evaluated code`,frames:[{func:"evaluated code"}]};var t=N(e.sourceURL),s=r+": "+e.message+` 9 at `+t;return e.line&&(s+=":"+e.line,e.column&&(s+=":"+e.column)),{mode:"sourceline",name:r,message:e.message,stackString:s,frames:[{url:t,line:e.line,column:e.column}]}}function ae(e){var r=e.name||_(e);return r?{mode:"nameonly",name:r,message:e.message,stackString:r+": "+e.message,frames:[]}:null}function _(e){var r=j.exec(String(e.constructor));return r&&r.length>1?r[1]:"unknown"}function ne(e){return e&&e.indexOf("nrWrapper")>=0}function R(e){var r=0,t;if(!e||!e.length)return r;for(var s=0;s<e.length;s++)t=e.charCodeAt(s),r=(r<<5)-r+t,r=r|0;return r}var J="Rrweb",Y="Security-Policy";function $(e,r,t){let s={shouldSwallow:r||!1,reason:t||"Other"},a=e.frames?.[0];if(!a||typeof e?.message!="string")return s;let n=a?.url?.match(/nr-(.*)-recorder.min.js/),i=a?.url?.match(/rrweb/),l=a?.url?.match(/recorder/),o=e.message.toLowerCase().match(/an attempt was made to break through the security policy of the user agent/);return n||i?(s.shouldSwallow=!0,s.reason=J,o&&(s.reason+="-"+Y)):l&&o&&(s.shouldSwallow=!0,s.reason=J+"-"+Y),s}function X(e){let r="";if(!e?.cause)return r;if(e.cause instanceof Error){let t=k(e.cause);r=t.stackString||e.cause.stack,t.message&&!r.includes(t.message)&&(r=t.message+` 10`+r),t.name&&!r.includes(t.name)&&(r=t.name+": "+r)}else r=typeof e.cause=="string"?e.cause:g(e.cause);return r||=e.cause.toString(),r}var S=class extends Error{};var ze=(()=>{class e extends V{static featureName=A;constructor(t){super(t,A),this.harvestOpts.aggregatorTypes=["err","ierr","xhr"],this.stackReported={},this.observedAt={},this.pageviewReported={},this.errorOnPage=!1,b("err",this.processError.bind(this),this.featureName,this.ee),b("ierr",this.processError.bind(this),this.featureName,this.ee),b("returnJserror",(s,a)=>this.#e(s,a),this.featureName,this.ee),this.waitForFlags(["err"]).then(([s])=>{s?this.drain():(this.blocked=!0,this.deregisterDrain())})}serializer(t){return W(t,this.obfuscator.obfuscateString.bind(this.obfuscator),"string")}queryStringsBuilder(t){let s={},a=g(this.agentRef.runtime.releaseIds);return a!=="{}
10"&&(s.ri=a),t?.err?.length&&(this.errorOnPage||(s.pve="1",this.errorOnPage=!0),this.agentRef.features?.[w.sessionReplay]?.featAggregate?.replayIsActive()||t.err.forEach(n=>delete n.params.hasReplay)),s}processError(t,s,a,n,i,l,o){if(t){s=s||C();try{let f=this.#r(t,a),m=k(t);this.#t(m,a,l),this.#s(m,o).forEach(c=>{this.#a(t,s,m,f,n,i,c)})}catch(f){if(!(f instanceof S))throw f}}}#r(t,s){let a;if(!s&&this.agentRef.runtime.onerror&&(a=this.agentRef.runtime.onerror(t),a&&!(typeof a.group=="string"&&a.group.length)))throw new S;return a}#t(t,s,a){let{shouldSwallow:n,reason:i}=$(t,s,a);if(n)throw this.reportSupportabilityMetric("Internal/Error/"+i),new S}#s(t,s){let a=[];if(s)a.push(s);else{if(this.harvestEndpointVersion===2){for(let n of t.frames)if(a.push(...P(n.url,this.agentRef)),a.length)break}a.length||a.push(void 0)}return a}#a(t,s,a,n,i,l,o){var f=this.#n(a);let m=X(t),c=d({stackHash:R(f),exceptionClass:a.name,request_uri:O?.location.pathname},m&&{cause:m});a.message&&(c.message=""+a.message),n?.group&&(c.errorGroup=n.group),l&&!o&&(c.hasReplay=l);var h=R("".concat(a.name,"_").concat(a.message,"_").concat(a.stackString,"_").concat(c.hasReplay?1:0,"_").concat(o?.id||"container","_").concat(o?.instance||""));this.stackReported[h]?c.browser_stack_hash=R(a.stackString):(this.stackReported[h]=!0,c.stack_trace=D(a.stackString),this.observedAt[h]=Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(s))),c.releaseIds=g(this.agentRef.runtime.releaseIds),this.pageviewReported[h]||(c.pageview=1,this.pageviewReported[h]=!0),c.firstOccurrenceTimestamp=this.observedAt[h],c.timestamp=Math.floor(this.agentRef.runtime.timeKeeper.correctRelativeTimestamp(s));var v="err",p={time:s};let u=[v,h,c,p,i];o||E("trace-jserror",u,void 0,w.sessionTrace,this.ee),!this.blocked&&(t.__newrelic?.socketId&&(i.socketId=t.__newrelic.socketId),o||(!!this.agentRef.features?.[w.softNav]?E("jserror",[u],void 0,w.softNav,this.ee):this.#e(u)),o&&this.#e(u,{},o))}#n(t){for(var s="",a=0;a<t.frames.length;a++){var n=t.frames[a],i=q(n.func);s&&(s+=` 11`),i&&(s+=i+"@"),typeof n.url=="string"&&(s+=n.url),n.line&&(s+=":"+n.line)}return s}#e(t,s={},a){let[n,i,l,o,f]=t,m=d({},L(a,this));Object.entries(this.agentRef.info.jsAttributes).forEach(([p,u])=>v(p,u)),Object.entries(s).forEach(([p,u])=>v(p,u)),l.browserInteractionId&&(i+=l.browserInteractionId),f&&Object.entries(f).forEach(([p,u])=>v(p,u));let c=R(g(m)),h=i+":"+c;this.events.add([n,h,l,o,m]),B(a,this)&&this.#e([n,i,d({},l),d({},o),f&&d({},f)],z(a,this));function v(p,u){m[p]=u&&typeof u=="object"?g(u):u}}}return e})();export{ze as Aggregate};
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.