1function u(e){let n=(o,a)=>a===0?0:o/a,i=n(e.hits,e.atBats),r=n(e.hits+e.walks+e.hitByPitch,e.atBats+e.walks+e.hitByPitch+e.sacrificeFlies),t=n(e.totalBases,e.atBats);return{battingAverage:Math.round(i*1e3)/1e3,onBasePercentage:Math.round(r*1e3)/1e3,sluggingPercentage:Math.round(t*1e3)/1e3,ops:Math.round((r+t)*1e3)/1e3,walkRate:Math.round(n(e.walks,e.plateAppearances)*1e3)/1e3,strikeoutRate:Math.round(n(e.strikeouts,e.plateAppearances)*1e3)/1e3,homeRunRate:Math.round(n(e.homeRuns,e.atBats)*1e3)/1e3,extraBaseHitRate:Math.round(n(e.doubles+e.triples+e.homeRuns,e.atBats)*1e3)/1e3,fieldingPct:Math.round(n(e.putouts+e.assists,e.putouts+e.assists+e.fieldingErrors)*1e3)/1e3}}function l(e,n,i,r,t=null,o=null){return{statKey:e,playerID:t,ptKey:o,playerName:n,side:i,slot:r,inBattingOrder:!1,plateAppearances:0,atBats:0,hits:0,singles:0,doubles:0,triples:0,homeRuns:0,runs:0,rbis:0,walks:0,intentionalWalks:0,hitByPitch:0,strikeouts:0,sacrificeFlies:0,sacrificeBunts:0,stolenBases:0,caughtStealing:0,reachedOnError:0,fieldersChoice:0,doublePlays:0,fieldingErrors:0,putouts:0,assists:0,totalBases:0}}function c(e){return`${Math.floor(e/3)}.${e%3}`}function h(e){return e>=1?e.toFixed(3):e.toFixed(3).substring(1)}function s(e,n){return e===null||n===null?"\u2014":`${e}-${n}`}export{u as a,l as b,c,h as d,s as 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.