1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12],{43927:(e,t,n)=>{n.r(t),n.d(t,{DEFAULT_RUM_PROFILER_CONFIGURATION:()=>f,createRumProfiler:()=>m});var r=n(42236),s=n(32068),i=n(26136),a=n(90198),o=n(13938),l=n(74349),u=n(18172);let c=new Map;function p(e){for(let t of c.keys())t<e&&c.delete(t)}var d=n(61608);let f={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function m(e,t,n,v,g=f){let b,h=(0,u.s5)(u.do.LONG_ANIMATION_FRAME),w=[],y={state:"stopped"};function k(){let n,r=(0,i.V)().Profiler;if(!r)throw v.set({status:"error",error_reason:"not-supported-by-browser"}),Error("RUM Profiler is not supported in this browser.");I(y).catch(a.Dx);let{cleanupTasks:p,observer:d}=function(n){let r;if("running"===n.state)return{cleanupTasks:n.cleanupTasks,observer:n.observer};let s=[];if(e.trackLongTasks){(r=new PerformanceObserver(T)).observe({entryTypes:[h?"long-animation-frame":"longtask"]});let e=t.subscribe(12,e=>{!function({rawRumEvent:e,startTime:t}){var n;e.type===u.bb.LONG_TASK&&(n=e.long_task.id,c.set(t,n))}(e)});s.push(()=>null==r?void 0:r.disconnect()),s.push(e.unsubscribe)}let i=t.subscribe(2,e=>{S({viewId:e.id,viewName:e.name,startClocks:e.startClocks})});return s.push(i.unsubscribe),{cleanupTasks:s,observer:r}}(y);try{n=new r({sampleInterval:g.sampleIntervalMs,maxBufferSize:Math.round(1.5*g.collectIntervalMs/g.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes("disabled by Document Policy")?(o.Vy.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),v.set({status:"error",error_reason:"missing-document-policy-header"})):v.set({status:"error",error_reason:"unexpected-exception"});return}v.set({status:"running",error_reason:void 0}),y={state:"running",startClocks:(0,s.M8)(),profiler:n,timeoutId:(0,l.wg)(k,g.collectIntervalMs),longTasks:[],views:[],cleanupTasks:p,observer:d},S(b),n.addEventListener("samplebufferfull",_)}async function I(t){var r,i;if("running"!==t.state)return;O(null!=(i=null==(r=t.observer)?void 0:r.takeRecords())?i:[]),(0,l.DJ)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",_);let{startClocks:o,longTasks:u,views:c}=t,f=(0,s.M8)();await t.profiler.stop().then(t=>{var r,i,l,m,v,b,h,w,y,k,I,M,S,_,T;let O,D,E,N,P,j,C,R,A,L,x,F,U=(0,s.M8)(),B=u.length>0,G=(0,s.vk)(o.timeStamp,U.timeStamp)<g.minProfileDurationMs,J=function(e){let t=0;for(let n of e)void 0!==n.stackId&&t++;return t}(t.samples)<g.minNumberOfSamples;!B&&(G||J)||(r=Object.assign(t,{startClocks:o,endClocks:U,clocksOrigin:(0,s.Oc)(),longTasks:u,views:c,sampleInterval:g.sampleIntervalMs}),O=null==(i=n.findTrackedSession())?void 0:i.id,(l=r,m=e.profilingEndpointBuilder,v=e.applicationId,b=O,L=(h=l,w=m,y=v,k=b,P=w.tags,j=(I=h,M=y,S=k,D={application:{id:M}},S&&(D.session={id:S}),(E=Array.from(new Set(I.views.map(e=>e.viewId)))).length&&(D.view={id:E}),(N=I.longTasks.map(e=>e.id).filter(e=>void 0!==e)).length&&(D.long_task={id:N}),D),C=P.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"]),{...j,attachments:["wall-time.json"],start:new Date(h.startClocks.timeStamp).toISOString(),end:new Date(h.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:C.join(","),_dd:{clock_drift:(0,s.TP)()}}),x=(_=l,T=L,R=new Blob([JSON.stringify(_)],{type:"application/json"}),(A=new FormData).append("event",new Blob([JSON.stringify(T)],{type:"application/json"}),"event.json"),A.append("wall-time.json",R,"wall-time.json"),{data:A,bytesCount:0}),F=m.build("fetch",x),(0,d.A2)("Sending profile to public profiling intake",{profilingIntakeURL:F,applicationId:v,sessionId:b}),fetch(F,{body:x.data,method:"POST"})).catch(a.Dx),p(f.relative))}).catch(a.Dx)}async function M(e){"running"===y.state&&(y.cleanupTasks.forEach(e=>e()),await I(y),y={state:e})}function S(e){"running"===y.state&&e&&y.views.push(e)}function _(){k()}function T(e){O(e.getEntries())}function O(e){if("running"===y.state)for(let n of e){var t;if(n.duration<g.sampleIntervalMs)continue;let e=(0,s.FR)(n.startTime),r=(t=e.relative,c.get(t));y.longTasks.push({id:r,duration:n.duration,entryType:n.entryType,startClocks:e})}}function D(){"hidden"===document.visibilityState&&"running"===y.state?M("paused").catch(a.Dx):"visible"===document.visibilityState&&"paused"===y.state&&k()}function E(){k()}return{start:function(t){"running"!==y.state&&(b=t?{startClocks:t.startClocks,viewId:t.id,viewName:t.name}:void 0,w.push((0,r.q)(e,window,"visibilitychange",D).stop,(0,r.q)(e,window,"beforeunload",E).stop),k())}
1,stop:async function e(){await M("stopped"),w.forEach(e=>e()),p((0,s.M8)().relative),v.set({status:"stopped",error_reason:void 0})},isStopped:function(){return"stopped"===y.state},isRunning:function(){return"running"===y.state},isPaused:function(){return"paused"===y.state}}}}}]);
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.