PageSourceSearch

https://tryfreshkit.com/_next/static/chunks/profiler.ba98d0368f9348d4.js

js tryfreshkit.com collected 2026-09-29 02:22:12 UTC 4,759 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9983],{30752:function(e,t,n){n.r(t),n.d(t,{DEFAULT_RUM_PROFILER_CONFIGURATION:function(){return m},createRumProfiler:function(){return v}});var i=n(22153),r=n(17409),s=n(2513),a=n(76538),o=n(84072),l=n(64871),u=n(36308);let c=new Map;function f(e){for(let t of c.keys())t<e&&c.delete(t)}var p=n(12776);let d=(e,t,n,i)=>{let s=function(e,t,n,i){let s=t.tags,a=function(e,t,n){let i={application:{id:t}};n&&(i.session={id:n});let r=Array.from(new Set(e.views.map(e=>e.viewId)));r.length&&(i.view={id:r});let s=e.longTasks.map(e=>e.id).filter(e=>void 0!==e);return s.length&&(i.long_task={id:s}),i}(e,n,i),o=s.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"]);return{...a,attachments:["wall-time.json"],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:o.join(","),_dd:{clock_drift:(0,r.QA)()}}}(e,t,n,i),a=function(e,t){let n=new Blob([JSON.stringify(e)],{type:"application/json"}),i=new FormData;return i.append("event",new Blob([JSON.stringify(t)],{type:"application/json"}),"event.json"),i.append("wall-time.json",n,"wall-time.json"),{data:i,bytesCount:0}}(e,s),o=t.build("fetch",a);return(0,p.eJ)("Sending profile to public profiling intake",{profilingIntakeURL:o,applicationId:n,sessionId:i}),fetch(o,{body:a.data,method:"POST"})},m={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function v(e,t,n,p=m){let v;let g=(0,u.wM)(u.uo.LONG_ANIMATION_FRAME),h=[],w={state:"stopped"};function b(){let n;let i=(0,s.R)().Profiler;if(!i)throw Error("RUM Profiler is not supported in this browser.");k(w).catch(a.$y);let{cleanupTasks:u,observer:f}=function(n){let i;if("running"===n.state)return{cleanupTasks:n.cleanupTasks,observer:n.observer};let r=[];if(e.trackLongTasks){(i=new PerformanceObserver(M)).observe({entryTypes:[g?"long-animation-frame":"longtask"]});let e=t.subscribe(12,e=>{!function({rawRumEvent:e,startTime:t}){var n;"long_task"===e.type&&(n=e.long_task.id,c.set(t,n))}(e)});r.push(()=>null==i?void 0:i.disconnect()),r.push(e.unsubscribe)}let s=t.subscribe(2,e=>{I({viewId:e.id,viewName:e.name,startClocks:e.startClocks})});return r.push(s.unsubscribe),{cleanupTasks:r,observer:i}}(w);try{n=new i({sampleInterval:p.sampleIntervalMs,maxBufferSize:Math.round(1.5*p.collectIntervalMs/p.sampleIntervalMs)})}catch(e){o.jf.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e);return}w={state:"running",startClocks:(0,r.$I)(),profiler:n,timeoutId:(0,l.iK)(b,p.collectIntervalMs),longTasks:[],views:[],cleanupTasks:u,observer:f},I(v),n.addEventListener("samplebufferfull",S)}async function k(t){var i,s;if("running"!==t.state)return;O(null!==(s=null===(i=t.observer)||void 0===i?void 0:i.takeRecords())&&void 0!==s?s:[]),(0,l.gr)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",S);let{startClocks:o,longTasks:u,views:c}=t,m=(0,r.$I)();await t.profiler.stop().then(t=>{let i=(0,r.$I)(),s=u.length>0,l=(0,r._J)(o.timeStamp,i.timeStamp)<p.minProfileDurationMs,v=function(e){let t=0;for(let n of e)void 0!==n.stackId&&t++;return t}(t.samples)<p.minNumberOfSamples;!s&&(l||v)||(function(t){var i;let r=null===(i=n.findTrackedSession())||void 0===i?void 0:i.id;d(t,e.profilingEndpointBuilder,e.applicationId,r).catch(a.$y)}(Object.assign(t,{startClocks:o,endClocks:i,clocksOrigin:(0,r.cQ)(),longTasks:u,views:c,sampleInterval:p.sampleIntervalMs})),f(m.relative))}).catch(a.$y)}async function y(e){"running"===w.state&&(w.cleanupTasks.forEach(e=>e()),await k(w),w={state:e})}function I(e){"running"===w.state&&e&&w.views.push(e)}function S(){b()}function M(e){O(e.getEntries())}function O(e){if("running"===w.state)for(let n of e){var t;if(n.duration<p.sampleIntervalMs)continue;let e=(0,r.DY)(n.startTime),i=(t=e.relative,c.get(t));w.longTasks.push({id:i,duration:n.duration,entryType:n.entryType,startClocks:e})}}function T(){"hidden"===document.visibilityState&&"running"===w.state?y("paused").catch(a.$y):"visible"===document.visibilityState&&"paused"===w.state&&b()}function _(){b()}return{start:function(t){"running"!==w.state&&(v=t?{startClocks:t.startClocks,viewId:t.id,viewName:t.name}:void 0,h.push((0,i.O)(e,window,"visibilitychange",T).stop,(0,i.O)(e,window,"beforeunload",_).stop
1),b())},stop:async function(){await y("stopped"),h.forEach(e=>e()),f((0,r.$I)().relative)},isStopped:function(){return"stopped"===w.state},isRunning:function(){return"running"===w.state},isPaused:function(){return"paused"===w.state}}}}}]);
2//# sourceMappingURL=profiler.ba98d0368f9348d4.js.map

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.