UNPKG

@bp1222/stats-api

Version:

Library for Typescript Client to query MLB StatsAPI

1,557 lines 188 kB
var Oe = Object.defineProperty; var Ie = (e, t, n) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var f = (e, t, n) => Ie(e, typeof t != "symbol" ? t + "" : t, n); const De = "https://statsapi.mlb.com/api".replace(/\/+$/, ""); class Ne { constructor(t = {}) { this.configuration = t; } set config(t) { this.configuration = t; } get basePath() { return this.configuration.basePath != null ? this.configuration.basePath : De; } get fetchApi() { return this.configuration.fetchApi; } get middleware() { return this.configuration.middleware || []; } get queryParamsStringify() { return this.configuration.queryParamsStringify || de; } get username() { return this.configuration.username; } get password() { return this.configuration.password; } get apiKey() { const t = this.configuration.apiKey; if (t) return typeof t == "function" ? t : () => t; } get accessToken() { const t = this.configuration.accessToken; if (t) return typeof t == "function" ? t : async () => t; } get headers() { return this.configuration.headers; } get credentials() { return this.configuration.credentials; } } const we = new Ne(), v = class v { constructor(t = we) { f(this, "middleware"); f(this, "fetchApi", async (t, n) => { let i = { url: t, init: n }; for (const a of this.middleware) a.pre && (i = await a.pre({ fetch: this.fetchApi, ...i }) || i); let r; try { r = await (this.configuration.fetchApi || fetch)(i.url, i.init); } catch (a) { for (const O of this.middleware) O.onError && (r = await O.onError({ fetch: this.fetchApi, url: i.url, init: i.init, error: a, response: r ? r.clone() : void 0 }) || r); if (r === void 0) throw a instanceof Error ? new Je(a, "The request failed and the interceptors did not return an alternative response") : a; } for (const a of this.middleware) a.post && (r = await a.post({ fetch: this.fetchApi, url: i.url, init: i.init, response: r.clone() }) || r); return r; }); this.configuration = t, this.middleware = t.middleware; } withMiddleware(...t) { const n = this.clone(); return n.middleware = n.middleware.concat(...t), n; } withPreMiddleware(...t) { const n = t.map((i) => ({ pre: i })); return this.withMiddleware(...n); } withPostMiddleware(...t) { const n = t.map((i) => ({ post: i })); return this.withMiddleware(...n); } /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ isJsonMime(t) { return t ? v.jsonRegex.test(t) : !1; } async request(t, n) { const { url: i, init: r } = await this.createFetchParams(t, n), a = await this.fetchApi(i, r); if (a && a.status >= 200 && a.status < 300) return a; throw new Re(a, "Response returned an error code"); } async createFetchParams(t, n) { let i = this.configuration.basePath + t.path; t.query !== void 0 && Object.keys(t.query).length !== 0 && (i += "?" + this.configuration.queryParamsStringify(t.query)); const r = Object.assign({}, this.configuration.headers, t.headers); Object.keys(r).forEach((_) => r[_] === void 0 ? delete r[_] : {}); const a = typeof n == "function" ? n : async () => n, O = { method: t.method, headers: r, body: t.body, credentials: this.configuration.credentials }, m = { ...O, ...await a({ init: O, context: t }) }; let G; be(m.body) || m.body instanceof URLSearchParams || Ge(m.body) ? G = m.body : this.isJsonMime(r["Content-Type"]) ? G = JSON.stringify(m.body) : G = m.body; const Te = { ...m, body: G }; return { url: i, init: Te }; } /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ clone() { const t = this.constructor, n = new t(this.configuration); return n.middleware = this.middleware.slice(), n; } }; f(v, "jsonRegex", new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i")); let p = v; function Ge(e) { return typeof Blob < "u" && e instanceof Blob; } function be(e) { return typeof FormData < "u" && e instanceof FormData; } class Re extends Error { constructor(n, i) { super(i); f(this, "name", "ResponseError"); this.response = n; } } class Je extends Error { constructor(n, i) { super(i); f(this, "name", "FetchError"); this.cause = n; } } class o extends Error { constructor(n, i) { super(i); f(this, "name", "RequiredError"); this.field = n; } } const ns = { csv: ",", ssv: " ", tsv: " ", pipes: "|" }; function de(e, t = "") { return Object.keys(e).map((n) => ue(n, e[n], t)).filter((n) => n.length > 0).join("&"); } function ue(e, t, n = "") { const i = n + (n.length ? `[${e}]` : e); if (t instanceof Array) { const r = t.map((a) => encodeURIComponent(String(a))).join(`&${encodeURIComponent(i)}=`); return `${encodeURIComponent(i)}=${r}`; } if (t instanceof Set) { const r = Array.from(t); return ue(e, r, n); } return t instanceof Date ? `${encodeURIComponent(i)}=${encodeURIComponent(t.toISOString())}` : t instanceof Object ? de(t, i) : `${encodeURIComponent(i)}=${encodeURIComponent(String(t))}`; } function is(e, t) { const n = e[t]; return n != null; } function C(e, t) { const n = {}; for (const i of Object.keys(e)) n[i] = t(e[i]); return n; } function rs(e) { for (const t of e) if (t.contentType === "multipart/form-data") return !0; return !1; } class l { constructor(t, n = (i) => i) { this.raw = t, this.transformer = n; } async value() { return this.transformer(await this.raw.json()); } } class as { constructor(t) { this.raw = t; } async value() { } } class os { constructor(t) { this.raw = t; } async value() { return await this.raw.blob(); } } class ls { constructor(t) { this.raw = t; } async value() { return await this.raw.text(); } } function ss(e) { return !0; } function ke(e) { return Fe(e); } function Fe(e, t) { return e == null ? e : { openingsTotalAway: e.openingsTotalAway == null ? void 0 : e.openingsTotalAway, openingsTotalHome: e.openingsTotalHome == null ? void 0 : e.openingsTotalHome, openingsTotalLost: e.openingsTotalLost == null ? void 0 : e.openingsTotalLost, openingsTotalYtd: e.openingsTotalYtd == null ? void 0 : e.openingsTotalYtd, attendanceTotal: e.attendanceTotal == null ? void 0 : e.attendanceTotal, attendanceTotalAway: e.attendanceTotalAway == null ? void 0 : e.attendanceTotalAway, attendanceTotalHome: e.attendanceTotalHome == null ? void 0 : e.attendanceTotalHome, attendanceAverageAway: e.attendanceAverageAway == null ? void 0 : e.attendanceAverageAway, attendanceAverageHome: e.attendanceAverageHome == null ? void 0 : e.attendanceAverageHome, attendanceAverageYtd: e.attendanceAverageYtd == null ? void 0 : e.attendanceAverageYtd, attendanceHigh: e.attendanceHigh == null ? void 0 : e.attendanceHigh, attendanceHighDate: e.attendanceHighDate == null ? void 0 : e.attendanceHighDate }; } function Ae(e) { return Be(e, !1); } function Be(e, t = !1) { return e == null ? e : { openingsTotalAway: e.openingsTotalAway, openingsTotalHome: e.openingsTotalHome, openingsTotalLost: e.openingsTotalLost, openingsTotalYtd: e.openingsTotalYtd, attendanceTotal: e.attendanceTotal, attendanceTotalAway: e.attendanceTotalAway, attendanceTotalHome: e.attendanceTotalHome, attendanceAverageAway: e.attendanceAverageAway, attendanceAverageHome: e.attendanceAverageHome, attendanceAverageYtd: e.attendanceAverageYtd, attendanceHigh: e.attendanceHigh, attendanceHighDate: e.attendanceHighDate }; } function ds(e) { return !0; } function W(e) { return Ee(e); } function Ee(e, t) { return e == null ? e : { link: e.link == null ? void 0 : e.link }; } function V(e) { return ve(e, !1); } function ve(e, t = !1) { return e == null ? e : { link: e.link }; } function us(e) { return !0; } function j(e) { return Ce(e); } function Ce(e, t) { return e == null ? e : { gamePk: e.gamePk == null ? void 0 : e.gamePk, link: e.link == null ? void 0 : e.link, content: e.content == null ? void 0 : W(e.content), dayNight: e.dayNight == null ? void 0 : e.dayNight }; } function ee(e) { return Le(e, !1); } function Le(e, t = !1) { return e == null ? e : { gamePk: e.gamePk, link: e.link, content: V(e.content), dayNight: e.dayNight }; } function cs(e) { return !0; } function He(e) { return xe(e); } function xe(e, t) { return e == null ? e : { seasonId: e.seasonId == null ? void 0 : e.seasonId, preSeasonStartDate: e.preSeasonStartDate == null ? void 0 : e.preSeasonStartDate, preSeasonEndDate: e.preSeasonEndDate == null ? void 0 : e.preSeasonEndDate, seasonStartDate: e.seasonStartDate == null ? void 0 : e.seasonStartDate, springStartDate: e.springStartDate == null ? void 0 : e.springStartDate, springEndDate: e.springEndDate == null ? void 0 : e.springEndDate, regularSeasonStartDate: e.regularSeasonStartDate == null ? void 0 : e.regularSeasonStartDate, lastDate1stHalf: e.lastDate1stHalf == null ? void 0 : e.lastDate1stHalf, allStarDate: e.allStarDate == null ? void 0 : e.allStarDate, firstDate2ndHalf: e.firstDate2ndHalf == null ? void 0 : e.firstDate2ndHalf, regularSeasonEndDate: e.regularSeasonEndDate == null ? void 0 : e.regularSeasonEndDate, postSeasonStartDate: e.postSeasonStartDate == null ? void 0 : e.postSeasonStartDate, postSeasonEndDate: e.postSeasonEndDate == null ? void 0 : e.postSeasonEndDate, seasonEndDate: e.seasonEndDate == null ? void 0 : e.seasonEndDate, offseasonStartDate: e.offseasonStartDate == null ? void 0 : e.offseasonStartDate, offSeasonEndDate: e.offSeasonEndDate == null ? void 0 : e.offSeasonEndDate, qualifierPlateAppearances: e.qualifierPlateAppearances == null ? void 0 : e.qualifierPlateAppearances, qualifierOutsPitched: e.qualifierOutsPitched == null ? void 0 : e.qualifierOutsPitched, seasonLevelGamedayType: e.seasonLevelGamedayType == null ? void 0 : e.seasonLevelGamedayType, gameLevelGamedayType: e.gameLevelGamedayType == null ? void 0 : e.gameLevelGamedayType }; } function We(e) { return Ve(e, !1); } function Ve(e, t = !1) { return e == null ? e : { seasonId: e.seasonId, preSeasonStartDate: e.preSeasonStartDate, preSeasonEndDate: e.preSeasonEndDate, seasonStartDate: e.seasonStartDate, springStartDate: e.springStartDate, springEndDate: e.springEndDate, regularSeasonStartDate: e.regularSeasonStartDate, lastDate1stHalf: e.lastDate1stHalf, allStarDate: e.allStarDate, firstDate2ndHalf: e.firstDate2ndHalf, regularSeasonEndDate: e.regularSeasonEndDate, postSeasonStartDate: e.postSeasonStartDate, postSeasonEndDate: e.postSeasonEndDate, seasonEndDate: e.seasonEndDate, offseasonStartDate: e.offseasonStartDate, offSeasonEndDate: e.offSeasonEndDate, qualifierPlateAppearances: e.qualifierPlateAppearances, qualifierOutsPitched: e.qualifierOutsPitched, seasonLevelGamedayType: e.seasonLevelGamedayType, gameLevelGamedayType: e.gameLevelGamedayType }; } function ms(e) { return !(!("id" in e) || e.id === void 0); } function P(e) { return Me(e); } function Me(e, t) { return e == null ? e : { id: e.id, code: e.code == null ? void 0 : e.code, link: e.link == null ? void 0 : e.link, name: e.name == null ? void 0 : e.name, abbreviation: e.abbreviation == null ? void 0 : e.abbreviation, sortOrder: e.sortOrder == null ? void 0 : e.sortOrder, activeStatus: e.activeStatus == null ? void 0 : e.activeStatus }; } function T(e) { return Ue(e, !1); } function Ue(e, t = !1) { return e == null ? e : { id: e.id, code: e.code, link: e.link, name: e.name, abbreviation: e.abbreviation, sortOrder: e.sortOrder, activeStatus: e.activeStatus }; } function fs(e) { return !(!("id" in e) || e.id === void 0); } function g(e) { return Ye(e); } function Ye(e, t) { return e == null ? e : { name: e.name == null ? void 0 : e.name, id: e.id, link: e.link == null ? void 0 : e.link, abbreviation: e.abbreviation == null ? void 0 : e.abbreviation, nameShort: e.nameShort == null ? void 0 : e.nameShort, seasonState: e.seasonState == null ? void 0 : e.seasonState, hasWildCard: e.hasWildCard == null ? void 0 : e.hasWildCard, hasSplitSeason: e.hasSplitSeason == null ? void 0 : e.hasSplitSeason, hasPlayoffPoints: e.hasPlayoffPoints == null ? void 0 : e.hasPlayoffPoints, numGames: e.numGames == null ? void 0 : e.numGames, numTeams: e.numTeams == null ? void 0 : e.numTeams, numWildcardTeams: e.numWildcardTeams == null ? void 0 : e.numWildcardTeams, seasonDateInfo: e.seasonDateInfo == null ? void 0 : He(e.seasonDateInfo), sport: e.sport == null ? void 0 : P(e.sport), season: e.season == null ? void 0 : e.season, orgCode: e.orgCode == null ? void 0 : e.orgCode, conferencesInUse: e.conferencesInUse == null ? void 0 : e.conferencesInUse, divisionsInUse: e.divisionsInUse == null ? void 0 : e.divisionsInUse, sortOrder: e.sortOrder == null ? void 0 : e.sortOrder, active: e.active == null ? void 0 : e.active }; } function h(e) { return $e(e, !1); } function $e(e, t = !1) { return e == null ? e : { name: e.name, id: e.id, link: e.link, abbreviation: e.abbreviation, nameShort: e.nameShort, seasonState: e.seasonState, hasWildCard: e.hasWildCard, hasSplitSeason: e.hasSplitSeason, hasPlayoffPoints: e.hasPlayoffPoints, numGames: e.numGames, numTeams: e.numTeams, numWildcardTeams: e.numWildcardTeams, seasonDateInfo: We(e.seasonDateInfo), sport: T(e.sport), season: e.season, orgCode: e.orgCode, conferencesInUse: e.conferencesInUse, divisionsInUse: e.divisionsInUse, sortOrder: e.sortOrder, active: e.active }; } function ps(e) { return !0; } function Ze(e) { return qe(e); } function qe(e, t) { return e == null ? e : { id: e.id == null ? void 0 : e.id, offset: e.offset == null ? void 0 : e.offset, offsetAtGameTime: e.offsetAtGameTime == null ? void 0 : e.offsetAtGameTime, tz: e.tz == null ? void 0 : e.tz }; } function ze(e) { return Ke(e, !1); } function Ke(e, t = !1) { return e == null ? e : { id: e.id, offset: e.offset, offsetAtGameTime: e.offsetAtGameTime, tz: e.tz }; } function gs(e) { return !0; } function Xe(e) { return Qe(e); } function Qe(e, t) { return e == null ? e : { capacity: e.capacity == null ? void 0 : e.capacity, turfType: e.turfType == null ? void 0 : e.turfType, roofType: e.roofType == null ? void 0 : e.roofType, leftLine: e.leftLine == null ? void 0 : e.leftLine, left: e.left == null ? void 0 : e.left, leftCenter: e.leftCenter == null ? void 0 : e.leftCenter, center: e.center == null ? void 0 : e.center, rightCenter: e.rightCenter == null ? void 0 : e.rightCenter, rightLine: e.rightLine == null ? void 0 : e.rightLine }; } function _e(e) { return je(e, !1); } function je(e, t = !1) { return e == null ? e : { capacity: e.capacity, turfType: e.turfType, roofType: e.roofType, leftLine: e.leftLine, left: e.left, leftCenter: e.leftCenter, center: e.center, rightCenter: e.rightCenter, rightLine: e.rightLine }; } function hs(e) { return !0; } function et(e) { return tt(e); } function tt(e, t) { return e == null ? e : { latitude: e.latitude == null ? void 0 : e.latitude, longitude: e.longitude == null ? void 0 : e.longitude }; } function nt(e) { return it(e, !1); } function it(e, t = !1) { return e == null ? e : { latitude: e.latitude, longitude: e.longitude }; } function ys(e) { return !0; } function rt(e) { return at(e); } function at(e, t) { return e == null ? e : { address1: e.address1 == null ? void 0 : e.address1, address2: e.address2 == null ? void 0 : e.address2, city: e.city == null ? void 0 : e.city, state: e.state == null ? void 0 : e.state, stateAbbrev: e.stateAbbrev == null ? void 0 : e.stateAbbrev, postalCode: e.postalCode == null ? void 0 : e.postalCode, country: e.country == null ? void 0 : e.country, phone: e.phone == null ? void 0 : e.phone, defaultCoordinates: e.defaultCoordinates == null ? void 0 : et(e.defaultCoordinates), azimuthAngle: e.azimuthAngle == null ? void 0 : e.azimuthAngle, elevation: e.elevation == null ? void 0 : e.elevation }; } function ot(e) { return lt(e, !1); } function lt(e, t = !1) { return e == null ? e : { address1: e.address1, address2: e.address2, city: e.city, state: e.state, stateAbbrev: e.stateAbbrev, postalCode: e.postalCode, country: e.country, phone: e.phone, defaultCoordinates: nt(e.defaultCoordinates), azimuthAngle: e.azimuthAngle, elevation: e.elevation }; } function Ss(e) { return !(!("id" in e) || e.id === void 0); } function y(e) { return st(e); } function st(e, t) { return e == null ? e : { id: e.id, name: e.name == null ? void 0 : e.name, link: e.link == null ? void 0 : e.link, active: e.active == null ? void 0 : e.active, season: e.season == null ? void 0 : e.season, location: e.location == null ? void 0 : rt(e.location), timeZone: e.timeZone == null ? void 0 : Ze(e.timeZone), fieldInfo: e.fieldInfo == null ? void 0 : Xe(e.fieldInfo) }; } function S(e) { return dt(e, !1); } function dt(e, t = !1) { return e == null ? e : { id: e.id, name: e.name, link: e.link, active: e.active, season: e.season, location: ot(e.location), timeZone: ze(e.timeZone), fieldInfo: _e(e.fieldInfo) }; } function Ps(e) { return !(!("id" in e) || e.id === void 0 || !("name" in e) || e.name === void 0); } function M(e) { return ut(e); } function ut(e, t) { return e == null ? e : { id: e.id, name: e.name, season: e.season == null ? void 0 : e.season, nameShort: e.nameShort == null ? void 0 : e.nameShort, link: e.link == null ? void 0 : e.link, abbreviation: e.abbreviation == null ? void 0 : e.abbreviation, league: e.league == null ? void 0 : g(e.league), sport: e.sport == null ? void 0 : P(e.sport), hasWildcard: e.hasWildcard == null ? void 0 : e.hasWildcard, sortOrder: e.sortOrder == null ? void 0 : e.sortOrder, numPlayoffTeams: e.numPlayoffTeams == null ? void 0 : e.numPlayoffTeams, active: e.active == null ? void 0 : e.active }; } function U(e) { return ct(e, !1); } function ct(e, t = !1) { return e == null ? e : { id: e.id, name: e.name, season: e.season, nameShort: e.nameShort, link: e.link, abbreviation: e.abbreviation, league: h(e.league), sport: T(e.sport), hasWildcard: e.hasWildcard, sortOrder: e.sortOrder, numPlayoffTeams: e.numPlayoffTeams, active: e.active }; } var mt = /* @__PURE__ */ ((e) => (e.Losing = "losses", e.Winning = "wins", e))(mt || {}); function Ts(e) { return !0; } function ft(e) { return pt(e); } function pt(e, t) { return e == null ? e : { streakType: e.streakType == null ? void 0 : e.streakType, streakCode: e.streakCode == null ? void 0 : e.streakCode, streakNumber: e.streakNumber == null ? void 0 : e.streakNumber }; } function gt(e) { return ht(e, !1); } function ht(e, t = !1) { return e == null ? e : { streakType: e.streakType, streakCode: e.streakCode, streakNumber: e.streakNumber }; } function Os(e) { return !(!("wins" in e) || e.wins === void 0 || !("losses" in e) || e.losses === void 0 || !("pct" in e) || e.pct === void 0); } function ce(e) { return yt(e); } function yt(e, t) { return e == null ? e : { wins: e.wins, losses: e.losses, ties: e.ties == null ? void 0 : e.ties, pct: e.pct }; } function me(e) { return St(e, !1); } function St(e, t = !1) { return e == null ? e : { wins: e.wins, losses: e.losses, ties: e.ties, pct: e.pct }; } function Is(e) { return !(!("team" in e) || e.team === void 0 || !("season" in e) || e.season === void 0 || !("streak" in e) || e.streak === void 0 || !("divisionRank" in e) || e.divisionRank === void 0 || !("leagueRank" in e) || e.leagueRank === void 0 || !("gamesBack" in e) || e.gamesBack === void 0 || !("leagueRecord" in e) || e.leagueRecord === void 0 || !("wins" in e) || e.wins === void 0 || !("losses" in e) || e.losses === void 0); } function fe(e) { return Pt(e); } function Pt(e, t) { return e == null ? e : { team: u(e.team), season: e.season, streak: ft(e.streak), clinchIndicator: e.clinchIndicator == null ? void 0 : e.clinchIndicator, divisionRank: e.divisionRank, leagueRank: e.leagueRank, sportRank: e.sportRank == null ? void 0 : e.sportRank, gamesPlayed: e.gamesPlayed == null ? void 0 : e.gamesPlayed, gamesBack: e.gamesBack, wildCardGamesBack: e.wildCardGamesBack == null ? void 0 : e.wildCardGamesBack, leagueGamesBack: e.leagueGamesBack == null ? void 0 : e.leagueGamesBack, sportGamesBack: e.sportGamesBack == null ? void 0 : e.sportGamesBack, springLeagueGamesBack: e.springLeagueGamesBack == null ? void 0 : e.springLeagueGamesBack, divisionGamesBack: e.divisionGamesBack == null ? void 0 : e.divisionGamesBack, conferenceGamesBack: e.conferenceGamesBack == null ? void 0 : e.conferenceGamesBack, leagueRecord: ce(e.leagueRecord), lastUpdated: e.lastUpdated == null ? void 0 : e.lastUpdated, runsAllowed: e.runsAllowed == null ? void 0 : e.runsAllowed, runsScored: e.runsScored == null ? void 0 : e.runsScored, divisionChamp: e.divisionChamp == null ? void 0 : e.divisionChamp, divisionLeader: e.divisionLeader == null ? void 0 : e.divisionLeader, hasWildcard: e.hasWildcard == null ? void 0 : e.hasWildcard, clinched: e.clinched == null ? void 0 : e.clinched, eliminationNumber: e.eliminationNumber == null ? void 0 : e.eliminationNumber, eliminationNumberSport: e.eliminationNumberSport == null ? void 0 : e.eliminationNumberSport, eliminationNumberLeague: e.eliminationNumberLeague == null ? void 0 : e.eliminationNumberLeague, eliminationNumberDivision: e.eliminationNumberDivision == null ? void 0 : e.eliminationNumberDivision, eliminationNumberConference: e.eliminationNumberConference == null ? void 0 : e.eliminationNumberConference, wildCardEliminationNumber: e.wildCardEliminationNumber == null ? void 0 : e.wildCardEliminationNumber, magicNumber: e.magicNumber == null ? void 0 : e.magicNumber, wins: e.wins, losses: e.losses, runDifferential: e.runDifferential == null ? void 0 : e.runDifferential, winningPercentage: e.winningPercentage == null ? void 0 : e.winningPercentage }; } function pe(e) { return Tt(e, !1); } function Tt(e, t = !1) { return e == null ? e : { team: c(e.team), season: e.season, streak: gt(e.streak), clinchIndicator: e.clinchIndicator, divisionRank: e.divisionRank, leagueRank: e.leagueRank, sportRank: e.sportRank, gamesPlayed: e.gamesPlayed, gamesBack: e.gamesBack, wildCardGamesBack: e.wildCardGamesBack, leagueGamesBack: e.leagueGamesBack, sportGamesBack: e.sportGamesBack, springLeagueGamesBack: e.springLeagueGamesBack, divisionGamesBack: e.divisionGamesBack, conferenceGamesBack: e.conferenceGamesBack, leagueRecord: me(e.leagueRecord), lastUpdated: e.lastUpdated, runsAllowed: e.runsAllowed, runsScored: e.runsScored, divisionChamp: e.divisionChamp, divisionLeader: e.divisionLeader, hasWildcard: e.hasWildcard, clinched: e.clinched, eliminationNumber: e.eliminationNumber, eliminationNumberSport: e.eliminationNumberSport, eliminationNumberLeague: e.eliminationNumberLeague, eliminationNumberDivision: e.eliminationNumberDivision, eliminationNumberConference: e.eliminationNumberConference, wildCardEliminationNumber: e.wildCardEliminationNumber, magicNumber: e.magicNumber, wins: e.wins, losses: e.losses, runDifferential: e.runDifferential, winningPercentage: e.winningPercentage }; } function Ds(e) { return !(!("id" in e) || e.id === void 0 || !("name" in e) || e.name === void 0); } function u(e) { return Ot(e); } function Ot(e, t) { return e == null ? e : { id: e.id, name: e.name, link: e.link == null ? void 0 : e.link, allStarStatus: e.allStarStatus == null ? void 0 : e.allStarStatus, season: e.season == null ? void 0 : e.season, venue: e.venue == null ? void 0 : y(e.venue), springVenue: e.springVenue == null ? void 0 : y(e.springVenue), teamCode: e.teamCode == null ? void 0 : e.teamCode, fileCode: e.fileCode == null ? void 0 : e.fileCode, abbreviation: e.abbreviation == null ? void 0 : e.abbreviation, teamName: e.teamName == null ? void 0 : e.teamName, locationName: e.locationName == null ? void 0 : e.locationName, firstYearOfPlay: e.firstYearOfPlay == null ? void 0 : e.firstYearOfPlay, league: e.league == null ? void 0 : g(e.league), springLeague: e.springLeague == null ? void 0 : g(e.springLeague), division: e.division == null ? void 0 : M(e.division), sport: e.sport == null ? void 0 : P(e.sport), record: e.record == null ? void 0 : fe(e.record), shortName: e.shortName == null ? void 0 : e.shortName, franchiseName: e.franchiseName == null ? void 0 : e.franchiseName, clubName: e.clubName == null ? void 0 : e.clubName, active: e.active == null ? void 0 : e.active }; } function c(e) { return It(e, !1); } function It(e, t = !1) { return e == null ? e : { id: e.id, name: e.name, link: e.link, allStarStatus: e.allStarStatus, season: e.season, venue: S(e.venue), springVenue: S(e.springVenue), teamCode: e.teamCode, fileCode: e.fileCode, abbreviation: e.abbreviation, teamName: e.teamName, locationName: e.locationName, firstYearOfPlay: e.firstYearOfPlay, league: h(e.league), springLeague: h(e.springLeague), division: U(e.division), sport: T(e.sport), record: pe(e.record), shortName: e.shortName, franchiseName: e.franchiseName, clubName: e.clubName, active: e.active }; } function Ns(e) { return !0; } function Dt(e) { return Nt(e); } function Nt(e, t) { return e == null ? e : { id: e.id == null ? void 0 : e.id, description: e.description == null ? void 0 : e.description }; } function wt(e) { return Gt(e, !1); } function Gt(e, t = !1) { return e == null ? e : { id: e.id, description: e.description }; } function ws(e) { return !0; } function bt(e) { return Rt(e); } function Rt(e, t) { return e == null ? e : { team: e.team == null ? void 0 : u(e.team), year: e.year == null ? void 0 : e.year, gameType: e.gameType == null ? void 0 : Dt(e.gameType), gamesTotal: e.gamesTotal == null ? void 0 : e.gamesTotal, gamesAwayTotal: e.gamesAwayTotal == null ? void 0 : e.gamesAwayTotal, gamesHomeTotal: e.gamesHomeTotal == null ? void 0 : e.gamesHomeTotal, openingsTotal: e.openingsTotal == null ? void 0 : e.openingsTotal, openingsTotalAway: e.openingsTotalAway == null ? void 0 : e.openingsTotalAway, openingsTotalHome: e.openingsTotalHome == null ? void 0 : e.openingsTotalHome, openingsTotalLost: e.openingsTotalLost == null ? void 0 : e.openingsTotalLost, attendanceTotal: e.attendanceTotal == null ? void 0 : e.attendanceTotal, attendanceTotalAway: e.attendanceTotalAway == null ? void 0 : e.attendanceTotalAway, attendanceTotalHome: e.attendanceTotalHome == null ? void 0 : e.attendanceTotalHome, attendanceAverageAway: e.attendanceAverageAway == null ? void 0 : e.attendanceAverageAway, attendanceAverageHome: e.attendanceAverageHome == null ? void 0 : e.attendanceAverageHome, attendanceAverageYtd: e.attendanceAverageYtd == null ? void 0 : e.attendanceAverageYtd, attendanceOpeningAverage: e.attendanceOpeningAverage == null ? void 0 : e.attendanceOpeningAverage, attendanceHigh: e.attendanceHigh == null ? void 0 : e.attendanceHigh, attendanceHighDate: e.attendanceHighDate == null ? void 0 : e.attendanceHighDate, attendanceHighGame: e.attendanceHighGame == null ? void 0 : j(e.attendanceHighGame), attendanceLow: e.attendanceLow == null ? void 0 : e.attendanceLow, attendanceLowDate: e.attendanceLowDate == null ? void 0 : e.attendanceLowDate, attendanceLowGame: e.attendanceLowGame == null ? void 0 : j(e.attendanceLowGame) }; } function Jt(e) { return kt(e, !1); } function kt(e, t = !1) { return e == null ? e : { team: c(e.team), year: e.year, gameType: wt(e.gameType), gamesTotal: e.gamesTotal, gamesAwayTotal: e.gamesAwayTotal, gamesHomeTotal: e.gamesHomeTotal, openingsTotal: e.openingsTotal, openingsTotalAway: e.openingsTotalAway, openingsTotalHome: e.openingsTotalHome, openingsTotalLost: e.openingsTotalLost, attendanceTotal: e.attendanceTotal, attendanceTotalAway: e.attendanceTotalAway, attendanceTotalHome: e.attendanceTotalHome, attendanceAverageAway: e.attendanceAverageAway, attendanceAverageHome: e.attendanceAverageHome, attendanceAverageYtd: e.attendanceAverageYtd, attendanceOpeningAverage: e.attendanceOpeningAverage, attendanceHigh: e.attendanceHigh, attendanceHighDate: e.attendanceHighDate, attendanceHighGame: ee(e.attendanceHighGame), attendanceLow: e.attendanceLow, attendanceLowDate: e.attendanceLowDate, attendanceLowGame: ee(e.attendanceLowGame) }; } function Gs(e) { return !(!("records" in e) || e.records === void 0 || !("aggregateTotals" in e) || e.aggregateTotals === void 0); } function Ft(e) { return At(e); } function At(e, t) { return e == null ? e : { records: e.records.map(bt), aggregateTotals: ke(e.aggregateTotals) }; } function bs(e) { return Bt(e, !1); } function Bt(e, t = !1) { return e == null ? e : { records: e.records.map(Jt), aggregateTotals: Ae(e.aggregateTotals) }; } function Rs(e) { return !0; } function Et(e) { return vt(e); } function vt(e, t) { return e == null ? e : { id: e.id == null ? void 0 : e.id, fullName: e.fullName == null ? void 0 : e.fullName, link: e.link == null ? void 0 : e.link }; } function Ct(e) { return Lt(e, !1); } function Lt(e, t = !1) { return e == null ? e : { id: e.id, fullName: e.fullName, link: e.link }; } function Js(e) { return !0; } function Ht(e) { return xt(e); } function xt(e, t) { return e == null ? e : { gamePk: e.gamePk == null ? void 0 : e.gamePk, link: e.link == null ? void 0 : e.link, content: e.content == null ? void 0 : W(e.content), gameNumber: e.gameNumber == null ? void 0 : e.gameNumber, dayNight: e.dayNight == null ? void 0 : e.dayNight }; } function Wt(e) { return Vt(e, !1); } function Vt(e, t = !1) { return e == null ? e : { gamePk: e.gamePk, link: e.link, content: V(e.content), gameNumber: e.gameNumber, dayNight: e.dayNight }; } function ks(e) { return !0; } function I(e) { return Mt(e); } function Mt(e, t) { return e == null ? e : { code: e.code == null ? void 0 : e.code, name: e.name == null ? void 0 : e.name, type: e.type == null ? void 0 : e.type, abbreviation: e.abbreviation == null ? void 0 : e.abbreviation }; } function D(e) { return Ut(e, !1); } function Ut(e, t = !1) { return e == null ? e : { code: e.code, name: e.name, type: e.type, abbreviation: e.abbreviation }; } function Fs(e) { return !0; } function Yt(e) { return $t(e); } function $t(e, t) { return e == null ? e : { season: e.season == null ? void 0 : e.season, stat: e.stat == null ? void 0 : e.stat, team: e.team == null ? void 0 : u(e.team), player: e.player == null ? void 0 : Et(e.player), league: e.league == null ? void 0 : g(e.league), sport: e.sport == null ? void 0 : P(e.sport), gameType: e.gameType == null ? void 0 : e.gameType, type: e.type == null ? void 0 : e.type, group: e.group == null ? void 0 : e.group, opponent: e.opponent == null ? void 0 : u(e.opponent), date: e.date == null ? void 0 : e.date, isHome: e.isHome == null ? void 0 : e.isHome, isWin: e.isWin == null ? void 0 : e.isWin, positionsPlayed: e.positionsPlayed == null ? void 0 : e.positionsPlayed.map(I), game: e.game == null ? void 0 : Ht(e.game), rank: e.rank == null ? void 0 : e.rank, position: e.position == null ? void 0 : I(e.position), batter: e.batter == null ? void 0 : s(e.batter), pitcher: e.pitcher == null ? void 0 : s(e.pitcher), numTeams: e.numTeams == null ? void 0 : e.numTeams, numLeagues: e.numLeagues == null ? void 0 : e.numLeagues }; } function Zt(e) { return qt(e, !1); } function qt(e, t = !1) { return e == null ? e : { season: e.season, stat: e.stat, team: c(e.team), player: Ct(e.player), league: h(e.league), sport: T(e.sport), gameType: e.gameType, type: e.type, group: e.group, opponent: c(e.opponent), date: e.date, isHome: e.isHome, isWin: e.isWin, positionsPlayed: e.positionsPlayed == null ? void 0 : e.positionsPlayed.map(D), game: Wt(e.game), rank: e.rank, position: D(e.position), batter: d(e.batter), pitcher: d(e.pitcher), numTeams: e.numTeams, numLeagues: e.numLeagues }; } function As(e) { return !0; } function te(e) { return zt(e); } function zt(e, t) { return e == null ? e : { displayName: e.displayName == null ? void 0 : e.displayName }; } function ne(e) { return Kt(e, !1); } function Kt(e, t = !1) { return e == null ? e : { displayName: e.displayName }; } function Bs(e) { return !0; } function Y(e) { return Xt(e); } function Xt(e, t) { return e == null ? e : { type: e.type == null ? void 0 : te(e.type), group: e.group == null ? void 0 : te(e.group), totalSplits: e.totalSplits == null ? void 0 : e.totalSplits, splitsTiedWithOffset: e.splitsTiedWithOffset == null ? void 0 : e.splitsTiedWithOffset, splitsTiedWithLimit: e.splitsTiedWithLimit == null ? void 0 : e.splitsTiedWithLimit, playerPool: e.playerPool == null ? void 0 : e.playerPool, exemptions: e.exemptions == null ? void 0 : e.exemptions, splits: e.splits == null ? void 0 : e.splits.map(Yt) }; } function $(e) { return Qt(e, !1); } function Qt(e, t = !1) { return e == null ? e : { type: ne(e.type), group: ne(e.group), totalSplits: e.totalSplits, splitsTiedWithOffset: e.splitsTiedWithOffset, splitsTiedWithLimit: e.splitsTiedWithLimit, playerPool: e.playerPool, exemptions: e.exemptions, splits: e.splits == null ? void 0 : e.splits.map(Zt) }; } function Es(e) { return !0; } function N(e) { return _t(e); } function _t(e, t) { return e == null ? e : { code: e.code == null ? void 0 : e.code, description: e.description == null ? void 0 : e.description }; } function w(e) { return jt(e, !1); } function jt(e, t = !1) { return e == null ? e : { code: e.code, description: e.description }; } function vs(e) { return !(!("id" in e) || e.id === void 0 || !("fullName" in e) || e.fullName === void 0 || !("link" in e) || e.link === void 0 || !("boxscoreName" in e) || e.boxscoreName === void 0); } function s(e) { return en(e); } function en(e, t) { return e == null ? e : { id: e.id, fullName: e.fullName, link: e.link, firstName: e.firstName == null ? void 0 : e.firstName, lastName: e.lastName == null ? void 0 : e.lastName, primaryNumber: e.primaryNumber == null ? void 0 : e.primaryNumber, birthDate: e.birthDate == null ? void 0 : e.birthDate, currentAge: e.currentAge == null ? void 0 : e.currentAge, birthCity: e.birthCity == null ? void 0 : e.birthCity, birthStateProvince: e.birthStateProvince == null ? void 0 : e.birthStateProvince, birthCountry: e.birthCountry == null ? void 0 : e.birthCountry, height: e.height == null ? void 0 : e.height, weight: e.weight == null ? void 0 : e.weight, active: e.active == null ? void 0 : e.active, currentTeam: e.currentTeam == null ? void 0 : u(e.currentTeam), primaryPosition: e.primaryPosition == null ? void 0 : I(e.primaryPosition), useName: e.useName == null ? void 0 : e.useName, useLastName: e.useLastName == null ? void 0 : e.useLastName, middleName: e.middleName == null ? void 0 : e.middleName, boxscoreName: e.boxscoreName, nickName: e.nickName == null ? void 0 : e.nickName, gender: e.gender == null ? void 0 : e.gender, isPlayer: e.isPlayer == null ? void 0 : e.isPlayer, isVerified: e.isVerified == null ? void 0 : e.isVerified, draftYear: e.draftYear == null ? void 0 : e.draftYear, pronunciation: e.pronunciation == null ? void 0 : e.pronunciation, stats: e.stats == null ? void 0 : e.stats.map(Y), mlbDebutDate: e.mlbDebutDate == null ? void 0 : e.mlbDebutDate, batSide: e.batSide == null ? void 0 : N(e.batSide), pitchHand: e.pitchHand == null ? void 0 : N(e.pitchHand), nameFirstLast: e.nameFirstLast == null ? void 0 : e.nameFirstLast, nameSlug: e.nameSlug == null ? void 0 : e.nameSlug, firstLastName: e.firstLastName == null ? void 0 : e.firstLastName, lastFirstName: e.lastFirstName == null ? void 0 : e.lastFirstName, lastInitName: e.lastInitName == null ? void 0 : e.lastInitName, initLastName: e.initLastName == null ? void 0 : e.initLastName, fullFMLName: e.fullFMLName == null ? void 0 : e.fullFMLName, fullLFMName: e.fullLFMName == null ? void 0 : e.fullLFMName, strikeZoneTop: e.strikeZoneTop == null ? void 0 : e.strikeZoneTop, strikeZoneBottom: e.strikeZoneBottom == null ? void 0 : e.strikeZoneBottom }; } function d(e) { return tn(e, !1); } function tn(e, t = !1) { return e == null ? e : { id: e.id, fullName: e.fullName, link: e.link, firstName: e.firstName, lastName: e.lastName, primaryNumber: e.primaryNumber, birthDate: e.birthDate, currentAge: e.currentAge, birthCity: e.birthCity, birthStateProvince: e.birthStateProvince, birthCountry: e.birthCountry, height: e.height, weight: e.weight, active: e.active, currentTeam: c(e.currentTeam), primaryPosition: D(e.primaryPosition), useName: e.useName, useLastName: e.useLastName, middleName: e.middleName, boxscoreName: e.boxscoreName, nickName: e.nickName, gender: e.gender, isPlayer: e.isPlayer, isVerified: e.isVerified, draftYear: e.draftYear, pronunciation: e.pronunciation, stats: e.stats == null ? void 0 : e.stats.map($), mlbDebutDate: e.mlbDebutDate, batSide: w(e.batSide), pitchHand: w(e.pitchHand), nameFirstLast: e.nameFirstLast, nameSlug: e.nameSlug, firstLastName: e.firstLastName, lastFirstName: e.lastFirstName, lastInitName: e.lastInitName, initLastName: e.initLastName, fullFMLName: e.fullFMLName, fullLFMName: e.fullLFMName, strikeZoneTop: e.strikeZoneTop, strikeZoneBottom: e.strikeZoneBottom }; } function Cs(e) { return !0; } function nn(e) { return rn(e); } function rn(e, t) { return e == null ? e : { id: e.id == null ? void 0 : e.id, name: e.name == null ? void 0 : e.name, date: e.date == null ? void 0 : e.date, season: e.season == null ? void 0 : e.season, team: e.team == null ? void 0 : u(e.team), player: e.player == null ? void 0 : s(e.player), notes: e.notes == null ? void 0 : e.notes, awardType: e.awardType == null ? void 0 : e.awardType }; } function an(e) { return on(e, !1); } function on(e, t = !1) { return e == null ? e : { id: e.id, name: e.name, date: e.date, season: e.season, team: c(e.team), player: d(e.player), notes: e.notes, awardType: e.awardType }; } function Ls(e) { return !0; } function ln(e) { return sn(e); } function sn(e, t) { return e == null ? e : { awards: e.awards == null ? void 0 : e.awards.map(nn) }; } function Hs(e) { return dn(e, !1); } function dn(e, t = !1) { return e == null ? e : { awards: e.awards == null ? void 0 : e.awards.map(an) }; } function xs(e) { return !0; } function Z(e) { return un(e); } function un(e, t) { return e == null ? e : { summary: e.summary == null ? void 0 : e.summary, gamesPlayed: e.gamesPlayed == null ? void 0 : e.gamesPlayed, flyOuts: e.flyOuts == null ? void 0 : e.flyOuts, groundOuts: e.groundOuts == null ? void 0 : e.groundOuts, airOuts: e.airOuts == null ? void 0 : e.airOuts, runs: e.runs == null ? void 0 : e.runs, doubles: e.doubles == null ? void 0 : e.doubles, triples: e.triples == null ? void 0 : e.triples, homeRuns: e.homeRuns == null ? void 0 : e.homeRuns, strikeOuts: e.strikeOuts == null ? void 0 : e.strikeOuts, baseOnBalls: e.baseOnBalls == null ? void 0 : e.baseOnBalls, intentionalWalks: e.intentionalWalks == null ? void 0 : e.intentionalWalks, hits: e.hits == null ? void 0 : e.hits, hitByPitch: e.hitByPitch == null ? void 0 : e.hitByPitch, avg: e.avg == null ? void 0 : e.avg, atBats: e.atBats == null ? void 0 : e.atBats, obp: e.obp == null ? void 0 : e.obp, slg: e.slg == null ? void 0 : e.slg, ops: e.ops == null ? void 0 : e.ops, babip: e.babip == null ? void 0 : e.babip, caughtStealing: e.caughtStealing == null ? void 0 : e.caughtStealing, stolenBases: e.stolenBases == null ? void 0 : e.stolenBases, stolenBasePercentage: e.stolenBasePercentage == null ? void 0 : e.stolenBasePercentage, caughtStealingPercentage: e.caughtStealingPercentage == null ? void 0 : e.caughtStealingPercentage, groundIntoDoublePlay: e.groundIntoDoublePlay == null ? void 0 : e.groundIntoDoublePlay, groundIntoTriplePlay: e.groundIntoTriplePlay == null ? void 0 : e.groundIntoTriplePlay, plateAppearances: e.plateAppearances == null ? void 0 : e.plateAppearances, totalBases: e.totalBases == null ? void 0 : e.totalBases, rbi: e.rbi == null ? void 0 : e.rbi, leftOnBase: e.leftOnBase == null ? void 0 : e.leftOnBase, sacBunts: e.sacBunts == null ? void 0 : e.sacBunts, sacFlies: e.sacFlies == null ? void 0 : e.sacFlies, catchersInterference: e.catchersInterference == null ? void 0 : e.catchersInterference, pickoffs: e.pickoffs == null ? void 0 : e.pickoffs, numberOfPitches: e.numberOfPitches == null ? void 0 : e.numberOfPitches, groundOutsToAirouts: e.groundOutsToAirouts == null ? void 0 : e.groundOutsToAirouts, atBatsPerHomeRun: e.atBatsPerHomeRun == null ? void 0 : e.atBatsPerHomeRun, popOuts: e.popOuts == null ? void 0 : e.popOuts, lineOuts: e.lineOuts == null ? void 0 : e.lineOuts }; } function q(e) { return cn(e, !1); } function cn(e, t = !1) { return e == null ? e : { summary: e.summary, gamesPlayed: e.gamesPlayed, flyOuts: e.flyOuts, groundOuts: e.groundOuts, airOuts: e.airOuts, runs: e.runs, doubles: e.doubles, triples: e.triples, homeRuns: e.homeRuns, strikeOuts: e.strikeOuts, baseOnBalls: e.baseOnBalls, intentionalWalks: e.intentionalWalks, hits: e.hits, hitByPitch: e.hitByPitch, avg: e.avg, atBats: e.atBats, obp: e.obp, slg: e.slg, ops: e.ops, babip: e.babip, caughtStealing: e.caughtStealing, stolenBases: e.stolenBases, stolenBasePercentage: e.stolenBasePercentage, caughtStealingPercentage: e.caughtStealingPercentage, groundIntoDoublePlay: e.groundIntoDoublePlay, groundIntoTriplePlay: e.groundIntoTriplePlay, plateAppearances: e.plateAppearances, totalBases: e.totalBases, rbi: e.rbi, leftOnBase: e.leftOnBase, sacBunts: e.sacBunts, sacFlies: e.sacFlies, catchersInterference: e.catchersInterference, pickoffs: e.pickoffs, numberOfPitches: e.numberOfPitches, groundOutsToAirouts: e.groundOutsToAirouts, atBatsPerHomeRun: e.atBatsPerHomeRun, popOuts: e.popOuts, lineOuts: e.lineOuts }; } function Ws(e) { return !0; } function mn(e) { return fn(e); } function fn(e, t) { return e == null ? e : { id: e.id == null ? void 0 : e.id, fullName: e.fullName == null ? void 0 : e.fullName, link: e.link == null ? void 0 : e.link }; } function pn(e) { return gn(e, !1); } function gn(e, t = !1) { return e == null ? e : { id: e.id, fullName: e.fullName, link: e.link }; } function Vs(e) { return !0; } function hn(e) { return yn(e); } function yn(e, t) { return e == null ? e : { official: e.official == null ? void 0 : mn(e.official), officialType: e.officialType == null ? void 0 : e.officialType }; } function Sn(e) { return Pn(e, !1); } function Pn(e, t = !1) { return e == null ? e : { official: pn(e.official), officialType: e.officialType }; } function Ms(e) { return !0; } function z(e) { return Tn(e); } function Tn(e, t) { return e == null ? e : { caughtStealing: e.caughtStealing == null ? void 0 : e.caughtStealing, stolenBases: e.stolenBases == null ? void 0 : e.stolenBases, stolenBasePercentage: e.stolenBasePercentage == null ? void 0 : e.stolenBasePercentage, caughtStealingPercentage: e.caughtStealingPercentage == null ? void 0 : e.caughtStealingPercentage, assists: e.assists == null ? void 0 : e.assists, putOuts: e.putOuts == null ? void 0 : e.putOuts, errors: e.errors == null ? void 0 : e.errors, chances: e.chances == null ? void 0 : e.chances, fielding: e.fielding == null ? void 0 : e.fielding, passedBall: e.passedBall == null ? void 0 : e.passedBall, pickoffs: e.pickoffs == null ? void 0 : e.pickoffs }; } function K(e) { return On(e, !1); } function On(e, t = !1) { return e == null ? e : { caughtStealing: e.caughtStealing, stolenBases: e.stolenBases, stolenBasePercentage: e.stolenBasePercentage, caughtStealingPercentage: e.caughtStealingPercentage, assists: e.assists, putOuts: e.putOuts, errors: e.errors, chances: e.chances, fielding: e.fielding, passedBall: e.passedBall, pickoffs: e.pickoffs }; } function Us(e) { return !0; } function X(e) { return In(e); } function In(e, t) { return e == null ? e : { summary: e.summary == null ? void 0 : e.summary, gamesPlayed: e.gamesPlayed == null ? void 0 : e.gamesPlayed, gamesStarted: e.gamesStarted == null ? void 0 : e.gamesStarted, flyOuts: e.flyOuts == null ? void 0 : e.flyOuts, groundOuts: e.groundOuts == null ? void 0 : e.groundOuts, airOuts: e.airOuts == null ? void 0 : e.airOuts, runs: e.runs == null ? void 0 : e.runs, doubles: e.doubles == null ? void 0 : e.doubles, triples: e.triples == null ? void 0 : e.triples, homeRuns: e.homeRuns == null ? void 0 : e.homeRuns, strikeOuts: e.strikeOuts == null ? void 0 : e.strikeOuts, baseOnBalls: e.baseOnBalls == null ? void 0 : e.baseOnBalls, intentionalWalks: e.intentionalWalks == null ? void 0 : e.intentionalWalks, hits: e.hits == null ? void 0 : e.hits, hitByPitch: e.hitByPitch == null ? void 0 : e.hitByPitch, atBats: e.atBats == null ? void 0 : e.atBats, obp: e.obp == null ? void 0 : e.obp, caughtStealing: e.caughtStealing == null ? void 0 : e.caughtStealing, stolenBases: e.stolenBases == null ? void 0 : e.stolenBases, stolenBasePercentage: e.stolenBasePercentage == null ? void 0 : e.stolenBasePercentage, numberOfPitches: e.numberOfPitches == null ? void 0 : e.numberOfPitches, wins: e.wins == null ? void 0 : e.wins, losses: e.losses == null ? void 0 : e.losses, saves: e.saves == null ? void 0 : e.saves, era: e.era == null ? void 0 : e.era, inningsPitched: e.inningsPitched == null ? void 0 : e.inningsPitched, saveOpportunities: e.saveOpportunities == null ? void 0 : e.saveOpportunities, earnedRuns: e.earnedRuns == null ? void 0 : e.earnedRuns, whip: e.whip == null ? void 0 : e.whip, battersFaced: e.battersFaced == null ? void 0 : e.battersFaced, outs: e.outs == null ? void 0 : e.outs, completeGames: e.completeGames == null ? void 0 : e.completeGames, shutouts: e.shutouts == null ? void 0 : e.shutouts, pitchesThrown: e.pitchesThrown == null ? void 0 : e.pitchesThrown, balls: e.balls == null ? void 0 : e.balls, strikes: e.strikes == null ? void 0 : e.strikes, strikePercentage: e.strikePercentage == null ? void 0 : e.strikePercentage, hitBatsmen: e.hitBatsmen == null ? void 0 : e.hitBatsmen, balks: e.balks == null ? void 0 : e.balks, wildPitches: e.wildPitches == null ? void 0 : e.wildPitches, pickoffs: e.pickoffs == null ? void 0 : e.pickoffs, groundOutsToAirouts: e.groundOutsToAirouts == null ? void 0 : e.groundOutsToAirouts, rbi: e.rbi == null ? void 0 : e.rbi, pitchesPerInning: e.pitchesPerInning == null ? void 0 : e.pitchesPerInning, runsScoredPer9: e.runsScoredPer9 == null ? void 0 : e.runsScoredPer9, homeRunsPer9: e.homeRunsPer9 == null ? void 0 : e.homeRunsPer9, in