PageSourceSearch

https://www.betgoodwin.co.uk/chunk-X57RZRHZ-e4058f01bb.js

js betgoodwin.co.uk collected 2026-09-29 16:46:56 UTC 4,643 bytes, 1 lines download raw bytes

1import{a as k}from"./chunk-ZBRKOKDC-e4058f01bb.js";import{a as l}from"./chunk-FSWCFVNX-e4058f01bb.js";import{a as D,b as R,d}from"./chunk-JSH3PFYE-e4058f01bb.js";import{d as E}from"./chunk-YSY7J76D-e4058f01bb.js";import{c as S}from"./chunk-T76KE36H-e4058f01bb.js";import{L as b,q as v,w as g}from"./chunk-MRJZQG62-e4058f01bb.js";var c=class{constructor(){this.aggregatedData={}}store(t,e,r,a,i){var n=this.#t(t,e,r,i);return n.metrics=H(a,n.metrics),n}merge(t,e,r,a,i,n=!1){var h=this.#t(t,e,a,i);if(n&&(h.params=a),!h.metrics){h.metrics=r;return}var o=h.metrics;o.count+=r.count,Object.keys(r||{}).forEach(u=>{if(u!=="count"){var O=o[u],f=r[u];f&&!f.c?o[u]=p(f.t,O):o[u]=x(f,o[u])}})}storeMetric(t,e,r,a){var i=this.#t(t,e,r);return i.stats=p(a,i.stats),i}take(t,e=!0){for(var r={},a="",i=!1,n=0;n<t.length;n++)a=t[n],r[a]=Object.values(this.aggregatedData[a]||{}),r[a].length&&(i=!0),e&&delete this.aggregatedData[a];return i?r:null}#t(t,e,r,a){this.aggregatedData[t]||(this.aggregatedData[t]={});var i=this.aggregatedData[t][e];return i||(i=this.aggregatedData[t][e]={params:r||{}},a&&(i.custom=a)),i}};function H(s,t){return t||(t={count:0}),t.count+=1,Object.entries(s||{}).forEach(([e,r])=>{t[e]=p(r,t[e])}),t}function p(s,t){return s==null?N(t):t?(t.c||(t=A(t.t)),t.c+=1,t.t+=s,t.sos+=s*s,s>t.max&&(t.max=s),s<t.min&&(t.min=s),t):{t:s}}function N(s){return s?s.c++:s={c:1},s}function x(s,t){return t?(t.c||(t=A(t.t)),t.min=Math.min(s.min,t.min),t.max=Math.max(s.max,t.max),t.t+=s.t,t.sos+=s.sos,t.c+=s.c,t):s}function A(s){return{t:s,min:s,max:s,sos:s*s,c:1}}var m=class{#t=new c;#e={};byteSize(){return 0}isEmpty({aggregatorTypes:t}){return t?t.every(e=>!this.#t.aggregatedData[e]):Object.keys(this.#t.aggregatedData).length===0}add([t,e,r,a,i]){return this.#t.store(t,e,r,a,i),!0}addMetric(t,e,r,a){return this.#t.storeMetric(t,e,r,a),!0}save({aggregatorTypes:t}){let e=t.toString(),r={};t.forEach(a=>r[a]=this.#t.aggregatedData[a]),this.#e[e]=r}get(t){let e=Array.isArray(t)?t:t.aggregatorTypes;return this.#t.take(e,!1)}clear({aggregatorTypes:t}={}){if(!t){this.#t.aggregatedData={};return}t.forEach(e=>delete this.#t.aggregatedData[e])}reloadSave({aggregatorTypes:t}){let e=t.toString(),r=this.#e[e];t.forEach(a=>{Object.keys(r[a]||{}).forEach(i=>{let n=r[a][i];this.#t.merge(a,i,n.metrics,n.params,n.custom,!0)})})}clearSave({aggregatorTypes:t}){let e=t.toString();delete this.#e[e]}};var y=class extends l{constructor(t,e){super(t,e),this.customAttributesAreSeparate=!1,this.canHarvestEarly=!0,this.isRetrying=!1,this.harvestOpts={},this.#t(),this.waitForDrain()}#t(){if(!this.events)switch(this.featureName){case g.sessionReplay:break;case g.jserrors:case g.metrics:this.events=this.agentRef.sharedAggregator??=new m;break;default:this.events=new k(R,this);break}}get supportsRegisteredEntities(){return this.featureName in d&&(d[this.featureName]||this.agentRef.init.feature_flags.includes("register."+this.featureName))}get harvestEndpointVersion(){return this.supportsRegisteredEntities&&this.agentRef.runtime.registeredEntities.length?2:1}waitForDrain(){this.ee.on("drain-"+this.featureName,()=>{this.drained||setTimeout(()=>this.agentRef.runtime.harvester.triggerHarvestFor(this),1),this.drained=!0})}decideEarlyHarvest(){if(!this.canHarvestEarly||this.blocked||this.isRetrying)return;let t=this.events.byteSize()+(this.customAttributesAreSeparate?this.agentRef.runtime.jsAttributesMetadata.bytes:0);t>D&&(this.agentRef.runtime.harvester.triggerHarvestFor(this),this.reportSupportabilityMetric("".concat(this.featureName,"/Harvest/Early/Seen"),t))}waitForFlags(t=[]){return new Promise((r,a)=>{this.agentRef.runtime?.activatedFeatures?r(i(this.agentRef.runtime.activatedFeatures)):this.ee.on("rumresp",(n={})=>{r(i(n))});function i(n){return t.map(h=>((n[h]===void 0||n[h]===null)&&v(71,h),n[h]?n[h]:0))}}).catch(r=>{this.ee.emit("internal-error",[r]),this.blocked=!0,this.deregisterDrain()})}drain(){S(this.agentRef,this.featureName)}preHarvestChecks(t){return!this.blocked&&!this.ee.aborted}makeHarvestPayload(t=!1,e={}){if(!this.events||this.events.isEmpty(this.harvestOpts)||this.preHarvestChecks&&!this.preHarvestChecks(e))return;t&&this.events.save(this.harvestOpts);let r=this.events.get(this.harvestOpts);if(!r)return;this.events.clear(this.harvestOpts);let i={body:this.serializer?this.serializer(r):r};return this.queryStringsBuilder&&(i.qs=this.queryStringsBuilder(r)),i}postHarvestCleanup(t={}){this.isRetrying=t.sent&&t.retry,this.isRetrying&&this.events.reloadSave(this.harvestOpts),this.events.clearSave(this.harvestOpts)}reportSupportabilityMetric(t,e){b(E,[t,e],void 0,g.metrics,this.ee)}};export{y as a};

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.