PageSourceSearch

https://cap-scorebook.com/_next/static/chunks/pages/game/[game_id]-32746a7ff1d93892.js

js cap-scorebook.com collected 2026-10-05 22:52:52 UTC 88,369 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4875],{64063:function(e){"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,l;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!==i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(l=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!==i--;)if(!Object.prototype.hasOwnProperty.call(r,l[i]))return!1;for(i=n;0!==i--;){var s=l[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}},49090:function(e){function t(e,t){e.onload=function(){this.onerror=this.onload=null,t(null,e)},e.onerror=function(){this.onerror=this.onload=null,t(new Error("Failed to load "+this.src),e)}}function r(e,t){e.onreadystatechange=function(){"complete"!=this.readyState&&"loaded"!=this.readyState||(this.onreadystatechange=null,t(null,e))}}e.exports=function(e,n,i){var l=document.head||document.getElementsByTagName("head")[0],s=document.createElement("script");"function"===typeof n&&(i=n,n={}),n=n||{},i=i||function(){},s.type=n.type||"text/javascript",s.charset=n.charset||"utf8",s.async=!("async"in n)||!!n.async,s.src=e,n.attrs&&function(e,t){for(var r in t)e.setAttribute(r,t[r])}(s,n.attrs),n.text&&(s.text=""+n.text),("onload"in s?t:r)(s,i),s.onload||t(s,i),l.appendChild(s)}},15919:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/game/[game_id]",function(){return r(37786)}])},93798:function(e,t,r){"use strict";r.d(t,{$:function(){return i}});var n=r(85893),i=(r(67294),function(e){var t=e.fixed,r=void 0!==t&&t;return(0,n.jsx)("div",{style:{padding:8,color:"white",position:r?"fixed":"relative",bottom:0}})})},17122:function(e,t,r){"use strict";r.d(t,{Z:function(){return a}});var n=r(14924),i=r(85893),l=r(67294),s=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=(0,l.useState)(100),n=r[0],i=r[1],s=(0,l.useRef)(Date.now());return(0,l.useEffect)((function(){if(t&&0!==e){s.current=Date.now();var r=setInterval((function(){var t=Date.now()-s.current;i((e-t%e)/e*100)}),100);return function(){return clearInterval(r)}}i(100)}),[e,t]),n},a=function(e){var t,r=e.refreshInterval,l=e.isEnabled,a=void 0===l||l,o=e.height,c=void 0===o?4:o,d=e.backgroundColor,u=void 0===d?"#e0e0e0":d,h=e.fillColor,p=void 0===h?"#4caf50":h,f=e.position,m=void 0===f?"top":f,y=s(r,a);return a&&0!==r?(0,i.jsx)("div",{style:(t={position:"fixed"},(0,n.Z)(t,m,0),(0,n.Z)(t,"left",0),(0,n.Z)(t,"right",0),(0,n.Z)(t,"height","".concat(c,"px")),(0,n.Z)(t,"backgroundColor",u),(0,n.Z)(t,"zIndex",9999),(0,n.Z)(t,"overflow","hidden"),t),children:(0,i.jsx)("div",{style:{height:"100%",width:"".concat(y,"%"),backgroundColor:p,transition:"width 0.1s linear"}})}):null}},49818:function(e,t,r){"use strict";r.d(t,{S:function(){return n}});var n={400:"\u5165\u529b\u9805\u76ee\u304c\u8db3\u308a\u3066\u3044\u307e\u305b\u3093\u3002(400)",401:"\u30ed\u30b0\u30a4\u30f3\u304c\u5fc5\u8981\u3067\u3059\u3002(401)",403:"\u7de8\u96c6\u6a29\u9650\u304c\u3042\u308a\u307e\u305b\u3093\u3002(403)",409:"\u4e0a\u66f8\u304d\u3067\u304d\u307e\u305b\u3093(409)",500:"\u30b5\u30fc\u30d0\u5074\u3067\u4f55\u3089\u304b\u306e\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u7ba1\u7406\u8005\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002(500)"}},37786:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return Ae},results:function(){return Be}});var n=r(47568),i=r(828),l=r(10092),s=r(85893),a=r(11163),o=r(67177),c=r(88716),d=r(7774),u=r(30381),h=r.n(u),p=r(98238),f=r(6271),m=r(27994),y=r(64371),g=r(94349),v=r(30631),x=(r(66477),r(67294)),b=function(){var e=(0,a.useRouter)(),t=(0,x.useState)(null),r=t[0],i=t[1];return(0,x.useEffect)((function(){if(e.query.game_id){var t=function(){var t=(0,n.Z)((function(){var t;return(0,l.__generator)(this,(function(r){switch(r.label){case 0:return[4,fetch(v.F+"/pitching_detail/"+e.query.game_id+"/result")];case 1:return[4,r.sent().json()];case 2:return t=r.sent(),i(t),[2]}}))}));return function(){return t.apply(this,arguments)}}();t()}}),[e]),[r]},_=function(){var e=(0,a.useRouter)(),t=(0,x.useState)(null),r=t[0],i=t[1];return(0,x.useEffect)((function(){if(e.query.game_id){var t=function(){var t=(0,n.Z)((function(){var t,r;return(0,l.__generator)(this,(function(n){switch(n.label){case 0:return[4,fetch(v.F+"/catching_sum/"+e.query.game_id+"/result")];case 1:return[4,(t=n.sent()).json()];case 2:return r=n.sent(),200===t.status&&i(r),[2]}}))}));return function(){return t.apply(this,arguments)}}();t()}}),[e]),[r]},j=r(44314),Z=r(8100),C=r(84104),w=r(54128),P=r(24404),T=r(41664),k=r.n(T),S=r(89733),N=r(96091),I=r(17815),R=r(26042),B=r(69396),A=r(88602),E=r(86848),F=r(68374),D=function(e){var t=e.is_first,r=e.rowIdx,n=e.colIdx,i=e.out,l=e.label,c=e.bk,d=e.wp,u=e.pb,h=e.rbi,p=e.pb
1Count,f=e.wpCount,m=e.bkCount,y=e.pitcher_color,g=e.catcher_color,v=e.inning,x=(0,a.useRouter)();return(0,s.jsxs)("div",{children:[(0,s.jsx)(F.Z,{onPress:function(){x.push("/game/"+x.query.game_id+"/"+Number(t)+"/"+(r+1)+"/"+(n+1))},children:(0,s.jsx)(o.Z,{style:(0,B.Z)((0,R.Z)({},{width:"4.5em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,boderTopWidth:1,borderColor:"#717171"}),{borderLeftColor:"#"+y,borderLeftWidth:3,position:"relative",borderBottomColor:"#"+g+"99",borderBottomWidth:1}),children:(0,s.jsx)(o.Z,{style:{flexDirection:"row"},children:(0,s.jsxs)(o.Z,{style:{display:"flex",flexDirection:"row"},children:[(0,s.jsx)("div",{id:"label_"+r+"_"+n+"_"+t,style:{margin:3,color:"#ccc",textDecoration:"underline",fontSize:12,fontWeight:3===i?"bold":"normal"},children:l}),(0,s.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",width:40},children:[(0,s.jsx)("div",{children:h>0?(0,s.jsx)("div",{className:"circle _rbi",children:h}):(0,s.jsx)(s.Fragment,{})}),(0,s.jsx)("div",{children:p>0?(0,s.jsxs)("div",{className:"circle _pbs",children:["P",u||0]}):(0,s.jsx)(s.Fragment,{})}),(0,s.jsx)("div",{children:"\ua4d8'"===l&&u>0?(0,s.jsx)("div",{className:"circle _pbs",children:u}):(0,s.jsx)(s.Fragment,{})}),(0,s.jsx)("div",{children:f>0?(0,s.jsxs)("div",{className:"circle _wps",children:["W",d||0]}):(0,s.jsx)(s.Fragment,{})}),(0,s.jsx)("div",{children:m>0?(0,s.jsxs)("div",{className:"circle _bks",children:["B",c||0]}):(0,s.jsx)(s.Fragment,{})})]})]})})})}),3===i?(0,s.jsx)("div",{className:"triangle",children:(0,s.jsx)("div",{style:{position:"absolute",fontSize:10,right:2,bottom:0},children:v})}):(0,s.jsx)(s.Fragment,{})]})},G=r(73447),W=r(89583),O={thCell:{backgroundColor:"#262626",width:"4.5em",height:"4.7em"},avgThCell:{backgroundColor:"#262626",width:"3.5em",height:"4.7em"},avgCell:{width:"3.5em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a",backgroundColor:"#262626"},avgCellGray:{width:"3.5em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a"},tdCell:{width:"4.5em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a",backgroundColor:"#262626"},tdCellGray:{width:"4.5em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a"},resultThCell:{backgroundColor:"#262626",width:"2em",height:"4.7em",paddingLeft:"0.4em",paddingRight:"0.4em"},resultThCell2:{backgroundColor:"#262626",width:"3em",height:"4.7em"},resultTdCell:{width:"2em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a",backgroundColor:"#262626",textAlign:"right"},resultTdCellGray:{width:"2em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a",textAlign:"right"},resultTdCell2:{width:"3em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a",backgroundColor:"#262626",textAlign:"right"},resultTdCell2Gray:{width:"3em",height:"2.5em",borderBottomWidth:1,borderRightWidth:1,borderLeftWidth:1,borderTopWidth:1,borderColor:"#4a4a4a",textAlign:"right"},text:{color:"#ccc",fontSize:12,margin:3,overflowX:"hidden",fontVariantNumeric:"tabular-nums"},player_name:{color:"#cccccc",textDecoration:"underline",fontSize:12,margin:"3px 3px 6px 3px",whiteSpace:"nowrap",overflowX:"hidden"}},z=function(e){for(var t=e.resultCell,r=e.cellData,n=e.team,i=e.is_first,l=e.members,a=(e.teams,e.personalResults),c=e.pitchingAggregate,d=e.catchingAggregate,u=e.battingAverages,h=e.pitchingAverages,p=e.runAggregate,f=e.players,m=e.pitchingResult,y=e.catchingResult,g=e.firebaseUser,b=e.dbUser,_=e.game,j=e.bureauData,Z=e.guess,T=(0,x.useContext)(w.n),S=T.p_result,N=T.setPResult,I=(0,x.useContext)(C.x),F=I.c_result,z=I.setCResult,L=G(v.HO,8),M=(0,x.useCallback)((function(e){switch(e){case 1:return"\u6295";case 2:return"\u6355";case 3:return"\u5b88";case 4:return"D";default:return"-"}}),[]),V=(0,x.useCallback)((function(e){if(0!==(null===f||void 0===f?void 0:f.length))return null===f||void 0===f?void 0:f.find((function(t){return Number(t.id)===e}))}),[f]),U=(0,x.useCallback)((function(e){var t;if(j)return null===j||void 0===j||null===(t=j.players)||void 0===t?void 0:t.find((function(t){return t.scorebook_player_id===e}))}),[j]),q=(0,x.useCallback)((function(e){var t;if(j){var r=null===j||void 0===j||null===(t=j.teams)||void 0===t?void 0:t.find((function(t){return t.team_id===e}));return r}}),[j]),Y=(0,x.useCallback)((function(e,t){if(m){var r=m.filter((function(e){return Boolean(Number(e.is_first))===t})),n=null;return r.forEach((function(t,r){t.pitcher_id===e&&(n=r)})),n}}),[m,i]),H=(0,x.useCallback)((function(e,t){if(y){var r=y.filter((function(e){return Boolean(Number(e.is_first))===t})),n=null;return r.forEach((function(t,r){t.catcher_id===e&&(n=r)})),n}}),[y,i]),X=[],Q=0;Q<(null===t||void 0===t?void 0:t.length);Q++)for(var J,$=0;$<(null===(J=t[Q])||void 0===J?void 0:J.length);$++)X[$]||(X[$]=[]),X[$][Q]=t[Q][$];if(0===l.length||!n||0===(null===f||void 0===f?void 0:f.length))return(0,s.jsx)(s.Fragment,{children:"Loading..."});for(var K,ee,te,re={},ne=0;ne<X.length;ne++){re[ne]||(re[ne]={});for(var ie=0;ie<X[ne].length;ie++){var le,se,ae,oe,ce,de,ue,he,pe,fe,me,ye,ge,ve,xe,be,_e,je,Ze;if(X[ne][ie])re[ne][X[ne][ie].player_id]=(0,s.jsx)(D,{pitcher_color:L[Y(null===(le=X[ne][ie])||void 0===le?void 0:le.pitcher_id,i)],catcher_color:L[H(null===(se=X[ne][ie])||void 0===se?void 0:se.catcher_id,i)],bkCount:null===(ae=X[ne][ie])||void 0===ae?void 0:ae.bk,wpCount:null===(oe=X[ne][ie])||void 0===oe?void 0:oe.wp,pbCount:null===(ce=X[ne][ie])||void 0===ce?void 0:ce.pb,is_first:i,rowIdx:ne,colIdx:ie,out:null===r||void 0===r||null===(de=r[ie])||void 0===de||null===(ue=de[ne])||void 0===ue?void 0:ue.out,label:null===(pe=Be[null===(he=X[ne][ie])||void 0===he?void 0:he.result])||void 0===pe?void 0:pe.label,bk:null===r||void 0===r||null===(fe=r[ie])||void 0===fe||null===(me=fe[ne])||void 0===me?void 0:me.bk,wp:null===r||void 0===r||null===(ye=r[ie])||void 0===ye||null===(ge=ye[ne])||void 0===ge?void 0:ge.wp,pb:null===r||void 0===r||null===(ve=r[ie])||void 0===ve||null===(xe=ve[ne])||void 0===xe?void 0:xe.pb,rbi:null===r||void 0===r||null===(be=r[ie])||void 0===be||null===(_e=be[ne])||void 0===_e?void 0:_e.rbi,inning:null===r||void 0===r||null===(je=r[ie])||void 0===je||null===(Ze=je[ne])||void 0===Ze?void 0:Ze.inning});else o.Z,o.Z,O.tdCellGray}}return(0,s.jsxs)(o.Z,{style:{padding:4},children:[(0,s.jsx)(o.Z,{children:(0,s.jsxs)(o.Z,{style:{display:"flex",flexDirection:"row"},children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:""})}),l.map((function(e,t){var r;return(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:M(null===(r=l[t])||void 0===r?void 0:r.position)})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:(0,B.Z)((0,R.Z)({},O.thCell),{width:"5.1em"}),children:(0,s.jsx)(P.Z,{style:O.text,children:"\u9078\u624b\u540d"})}),l.map((function(e,t){var r,n,i,a,c,d;return(0,s.jsxs)(o.Z,{style:t%2===1?(0,B.Z)((0,R.Z)({},O.tdCell),{width:"5.1em",borderLeftWidth:3,borderLeftColor:(null===(r=V(l[t].player_id))||void 0===r?void 0:r.batting_side)?"#ff7676":"#7b7bff"}):(0,B.Z)((0,R.Z)({},O.tdCellGray),{width:"5.1em",borderLeftWidth:3,borderLeftColor:(null===(n=V(l[t].player_id))||void 0===n?void 0:n.batting_side)?"#ff7676":"#7b7bff"}),children:[(0,s.jsx)("div",{style:O.player_name,children:(0,s.jsx)(k(),{href:"/player/"+l[t].player_id,children:(0,s.jsx)("a",{children:null===(i=V(l[t].player_id))||void 0===i?void 0:i.name})})}
1),(0,s.jsx)("div",{style:{fontSize:10,color:"#979797",whiteSpace:"nowrap",width:"4.2rem",overflow:"hidden",margin:3,textDecoration:"none"},children:null!==(K=null===(c=q(null===(a=U(l[t].player_id))||void 0===a?void 0:a.team_id))||void 0===c?void 0:c.short_name)&&void 0!==K?K:null===(d=V(l[t].player_id))||void 0===d?void 0:d.team_name})]})}))]}),(0,s.jsxs)(A.Z,{horizontal:!0,children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.avgThCell,children:(0,s.jsxs)(P.Z,{style:(0,B.Z)((0,R.Z)({},O.text),{textAlign:"center"}),children:["\u6253",(0,s.jsx)("br",{}),"\u7387"]})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.avgCell:O.avgCellGray,children:(0,s.jsx)(P.Z,{style:(0,B.Z)((0,R.Z)({},O.text),{textAlign:"right"}),children:function(){if(u){var t=u.filter((function(t){return t.player_id===e.player_id}));return t[0]&&null!==t[0].average?t[0].average.toFixed(3):"-"}}()})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u6253\u5e2d\u6570"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].tpa:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u6253\u6570"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].atBats:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u5b89\u6253"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].hit:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u4e00\u5841\u6253"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].single:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u4e8c\u5841\u6253"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].double:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u4e09\u5841\u6253"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].triple:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u672c\u5841\u6253"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].homerun:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u6253\u70b9"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].rbi:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u5f97\u70b9"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:(null===p||void 0===p?void 0:p[e.player_id])?null===p||void 0===p?void 0:p[e.player_id]:0})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u56db\u6b7b\u74
103"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].fourball:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u656c\u9060"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].intentional:""})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u4e09\u632f"})}),l.map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:a&&a[e.player_id]?a[e.player_id].strike_out:""})})})}))]}),X.map((function(e,t){return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{style:O.thCell,children:(0,s.jsx)(P.Z,{style:O.text,children:t+1})}),l.map((function(e,r){return(0,s.jsx)(o.Z,{children:re[t][e.player_id]?re[t][e.player_id]:(0,s.jsx)(o.Z,{style:O.tdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:"-"})})})}))]})})}))]})]})}),(0,s.jsx)(P.Z,{style:{color:"orange",fontSize:12},children:"\u6295\u624b\u6210\u7e3e"}),(0,s.jsxs)(o.Z,{style:{display:"flex",flexDirection:"row"},children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.thCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u9078\u624b\u540d"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{style:{borderRightColor:"#"+L[Y(e.pitcher_id,!i)],borderRightWidth:3},children:(0,s.jsx)(o.Z,{style:t%2===1?O.tdCell:O.tdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:null===e||void 0===e?void 0:e.name})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(A.Z,{horizontal:!0,children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.avgThCell,children:(0,s.jsxs)(P.Z,{style:(0,B.Z)((0,R.Z)({},O.text),{textAlign:"center"}),children:["\u9632",(0,s.jsx)("br",{}),"\u5fa1",(0,s.jsx)("br",{}),"\u7387"]})})}),m&&m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.avgCell:O.avgCellGray,children:(0,s.jsx)(P.Z,{style:(0,B.Z)((0,R.Z)({},O.text),{textAlign:"right"}),children:function(){if(h){var t=h.filter((function(t){return e.pitcher_id===t.player_id}));return t[0]&&null!==t[0].era?t[0].era.toFixed(2):""}}()})})})}))]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell2,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u6295\u7403\u56de"})})}),function(){if(m)return m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell2:O.resultTdCell2Gray,children:(0,s.jsx)(P.Z,{style:O.text,children:function(){if(t>0){var r=(0,R.Z)({},S.current);return r[e.pitcher_id]||(r[e.pitcher_id]={runs:0,er:0,inning:0,win:0,lose:0,save:0,hold:0,team_id:null}),r[e.pitcher_id].inning=e.inning,N(r),e.inning.toFixed(2)}var n=(0,R.Z)({},S.current);return n[e.pitcher_id]||(n[e.pitcher_id]={runs:0,er:0,inning:0,win:0,lose:0,save:0,hold:0,team_id:null}),n[e.pitcher_id].inning=e.inning,N(n),e.inning.toFixed(2)}()})})})}))}()]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u596a\u4e09\u632f"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.strike_out})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u4e0e\u56db\u6b7b\u7403"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.four_ball})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u6545\u610f\u56db\u7403"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.intentional})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u88ab\u5b89\u6253"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.hit})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u88ab\u672c"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.homerun})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u7403\u6570"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.pitch_count})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u66b4\u6295"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.wp})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u593
11\u66b4\u6295"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:c[e.pitcher_id]?c[e.pitcher_id].runsByWp:0})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u5931\u70b9"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:c[e.pitcher_id].runs})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell2,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u81ea\u8cac\u70b9"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){var r,n;return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell2:O.resultTdCell2Gray,children:g&&b&&!_.locked?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E.Z,{enabled:!1,selectedValue:null!==(ee=null===c||void 0===c||null===(r=c[e.pitcher_id])||void 0===r?void 0:r.er)&&void 0!==ee?ee:null,style:{fontSize:12},onValueChange:function(t){var r=(0,R.Z)({},S.current);r[e.pitcher_id]||(r[e.pitcher_id]={runs:0,er:0,inning:0,win:0,lose:0,save:0,hold:0,team_id:null}),r[e.pitcher_id].er=t,N(r)},children:function(){var t=[];t.push((0,s.jsx)(E.Z.Item,{label:"",value:null}));for(var r=0;r<=c[e.pitcher_id].runs;r++)t.push((0,s.jsx)(E.Z.Item,{label:r.toString(),value:r}));return t}()}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:4,alignItems:"center"},children:[(0,s.jsx)(W.iNY,{size:12,color:"#66c2a5"}),(0,s.jsx)("span",{style:{fontSize:12,color:"#66c2a5"},children:null===(n=c[e.pitcher_id])||void 0===n?void 0:n.er})]})]}):(0,s.jsx)(P.Z,{style:O.text,children:e.er})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell2,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u52dd\u6557S"})})}),m?m.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell2:O.resultTdCell2Gray,children:g&&b&&!_.locked?(0,s.jsxs)(E.Z,{enabled:!1,selectedValue:e.pitcher_id===(null===Z||void 0===Z?void 0:Z.winPitcherId)?1:e.pitcher_id===(null===Z||void 0===Z?void 0:Z.losePitcherId)?2:e.pitcher_id===(null===Z||void 0===Z?void 0:Z.savePitcherId)?3:0,style:{fontSize:12},onValueChange:function(t){var r=(0,R.Z)({},S.current);switch(r[e.pitcher_id].win=0,r[e.pitcher_id].lose=0,r[e.pitcher_id].save=0,r[e.pitcher_id].hold=0,Number(t)){case 1:r[e.pitcher_id].win=1;break;case 2:r[e.pitcher_id].lose=1;break;case 3:r[e.pitcher_id].save=1;break;case 4:r[e.pitcher_id].hold=1}N(r)},children:[(0,s.jsx)(E.Z.Item,{label:"",value:0}),(0,s.jsx)(E.Z.Item,{label:"\u52dd",value:1}),(0,s.jsx)(E.Z.Item,{label:"\u6557",value:2}),(0,s.jsx)(E.Z.Item,{label:"S",value:3})]}):(0,s.jsx)(P.Z,{style:O.text,children:1===e.win?"\u52dd":1===e.lose?"\u6557":1===e.save?"S":1===e.hold?"H":void 0})})})})):(0,s.jsx)(s.Fragment,{})]})]})]}),(0,s.jsx)(P.Z,{style:{color:"orange",fontSize:12},children:"\u6355\u624b\u6210\u7e3e"}),(0,s.jsxs)(o.Z,{style:{display:"flex",flexDirection:"row"},children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.thCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u9078\u624b\u540d"})})}),y?y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?(0,B.Z)((0,R.Z)({},O.tdCell),{borderRightColor:"#"+L[H(e.catcher_id,!i)],borderRightWidth:3}):(0,B.Z)((0,R.Z)({},O.tdCellGray),{borderRightColor:"#"+L[H(e.catcher_id,!i)],borderRightWidth:3}),children:(0,s.jsx)(P.Z,{style:O.text,children:null===e||void 0===e?void 0:e.name})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(A.Z,{horizontal:!0,children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell2,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u5b88\u5099\u56de"})})}),function(){if(y)return y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell2:O.resultTdCell2Gray,children:(0,s.jsx)(P.Z,{style:O.text,children:function(){if(t>0){var r=(0,R.Z)({},F.current);return r[e.catcher_id]||(r[e.catcher_id]={runs:0,er:0,inning:0,win:0,lose:0,save:0,hold:0,team_id:null}),r[e.catcher_id].inning=e.inning,z(r),e.inning.toFixed(2)}var n=(0,R.Z)({},F.current);return n[e.catcher_id]||(n[e.catcher_id]={runs:0,er:0,inning:0,win:0,lose:0,save:0,hold:0,team_id:null}),n[e.catcher_id].inning=e.inning,z(n),e.inning.toFixed(2)}()})})})}))}()]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u6355\u9038"})})}),y?y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:e.pb})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u593
11\u6355\u9038"})})}),y?y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:d[e.catcher_id]?d[e.catcher_id].runsByPb:0})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u5931\u70b9"})})}),y?y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell:O.resultTdCellGray,children:(0,s.jsx)(P.Z,{style:O.text,children:d[e.catcher_id].runs})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell2,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u81ea\u8cac\u70b9"})})}),y?y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){var r,n;return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell2:O.resultTdCell2Gray,children:g&&b&&!_.locked?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(E.Z,{enabled:!1,selectedValue:null!==(te=null===d||void 0===d||null===(r=d[e.catcher_id])||void 0===r?void 0:r.runsByPb)&&void 0!==te?te:null,style:{fontSize:12},onValueChange:function(t){var r=(0,R.Z)({},F.current);r[e.catcher_id]||(r[e.catcher_id]={runs:0,er:0,inning:0,win:0,lose:0,save:0,hold:0,team_id:null}),r[e.catcher_id].er=t,z(r)},children:function(){var t=[];t.push((0,s.jsx)(E.Z.Item,{label:"",value:null}));for(var r=0;r<=Math.max(d[e.catcher_id].runs,d[e.catcher_id].runsByPb);r++)t.push((0,s.jsx)(E.Z.Item,{label:r.toString(),value:r}));return t}()}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:4,alignItems:"center"},children:[(0,s.jsx)(W.iNY,{size:12,color:"#66c2a5"}),(0,s.jsx)("span",{style:{fontSize:12,color:"#66c2a5"},children:null===(n=d[e.catcher_id])||void 0===n?void 0:n.runsByPb})]})]}):(0,s.jsx)(P.Z,{style:O.text,children:e.er})})})})):(0,s.jsx)(s.Fragment,{})]}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:O.resultThCell2,children:(0,s.jsx)(P.Z,{style:O.text,children:"\u52dd\u6557S"})})}),y?y.filter((function(e){return Boolean(Number(e.is_first))!==i})).map((function(e,t){return(0,s.jsx)(o.Z,{children:(0,s.jsx)(o.Z,{style:t%2===1?O.resultTdCell2:O.resultTdCell2Gray,children:g&&b&&!_.locked?(0,s.jsxs)(E.Z,{enabled:!1,selectedValue:0,style:{fontSize:12},onValueChange:function(t){var r=(0,R.Z)({},F.current);switch(Number(t)){case 0:r[e.catcher_id].win=0,r[e.catcher_id].lose=0,r[e.catcher_id].save=0;break;case 1:r[e.catcher_id].win=1,r[e.catcher_id].lose=0,r[e.catcher_id].save=0;break;case 2:r[e.catcher_id].win=0,r[e.catcher_id].lose=1,r[e.catcher_id].save=0;break;case 3:r[e.catcher_id].win=0,r[e.catcher_id].lose=0,r[e.catcher_id].save=1}z(r)},children:[(0,s.jsx)(E.Z.Item,{label:"",value:0}),(0,s.jsx)(E.Z.Item,{label:"\u52dd",value:1}),(0,s.jsx)(E.Z.Item,{label:"\u6557",value:2}),(0,s.jsx)(E.Z.Item,{label:"S",value:3})]}):(0,s.jsx)(P.Z,{style:O.text,children:1===e.win?"\u52dd":1===e.lose?"\u6557":1===e.save?"S":void 0})})})})):(0,s.jsx)(s.Fragment,{})]})]})]})]})},L=r(76853),M=r(64063),V=r(11062),U=Object.defineProperty,q=Object.defineProperties,Y=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,J=(e,t,r)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$=(e,t)=>{for(var r in t||(t={}))X.call(t,r)&&J(e,r,t[r]);if(H)for(var r of H(t))Q.call(t,r)&&J(e,r,t[r]);return e},K=(e,t)=>q(e,Y(t));function ee(e={}){return K($({},e),{height:0,width:0,playerVars:K($({},e.playerVars),{autoplay:0,start:0,end:0})})}var te={videoId:L.string,id:L.string,className:L.string,iframeClassName:L.string,style:L.object,title:L.string,loading:L.oneOf(["lazy","eager"]),opts:L.objectOf(L.any),onReady:L.func,onError:L.func,onPlay:L.func,onPause:L.func,onEnd:L.func,onStateChange:L.func,onPlaybackRateChange:L.func,onPlaybackQualityChange:L.func},re=class extends x.Component{constructor(e){super(e),this.destroyPlayerPromise=void 0,this.onPlayerReady=e=>{var t,r;return null==(r=(t=this.props).onReady)?void 0:r.call(t,e)},this.onPlayerError=e=>{var t,r;return null==(r=(t=this.props).onError)?void 0:r.call(t,e)},this.onPlayerStateChange=e=>{var t,r,n,i,l,s,a,o;switch(null==(r=(t=this.props).onStateChange)||r.call(t,e),e.data){case re.PlayerState.ENDED:null==(i=(n=this.props).onEnd)||i.call(n,e);break;case re.PlayerState.PLAYING:null==(s=(l=this.props).onPlay)||s.call(l,e);break;case re.PlayerState.PAUSED:null==(o=(a=this.props).onPause)||o.call(a,e)}},this.onPlayerPlaybackRateChange=e=>{var t,r;return null==(r=(t=this.props).onPlaybackRateChange)?void 0:r.call(t,e)},this.onPlayerPlaybackQualityChange=e=>{var t,r;return null==(r=(t=this.props).onPlaybackQualityChange)?void 0:r.call(t,e)},this.destroyPlayer=()=>this.internalPlayer?(this.destroyPlayerPromise=this.internalPlayer.destroy().then((()=>this.destroyPlayerPromise=void 0)),this.destroyPlayerPromise):Promise.resolve(),this.createPlayer=()=>{if("undefined"===typeof document)return;if(this.destroyPlayerPromise)return void this.destroyPlayerPromise.then(this.createPlayer);const e=K($({},this.props.opts),{videoId:this.props.videoId});this.internalPlayer=V(this.container,e),this.internalPlayer.on("ready",this.onPlayerReady),this.internalPlayer.on("error",this.onPlayerError),this.internalPlayer.on("stateChange",this.onPlayerStateChange),this.internalPlayer.on("playbackRateChange",this.onPlayerPlaybackRateChange),this.internalPlayer.on("playbackQualityChange",this.onPlayerPlaybackQualityChange),(this.props.title||this.props.loading)&&this.internalPlayer.getIframe().then((e=>{this.props.title&&e.setAttribute("title",this.props.title),this.props.loading&&e.setAttribute("loading",this.props.loading)}))},this.resetPlayer=()=>this.destroyPlayer().then(this.createPlayer),this.updatePlayer=()=>{var e;null==(e=this.internalPlayer)||e.getIframe().then((e=>{this.props.id?e.setAttribute("id",this.props.id):e.removeAttribute("id"),this.props.iframeClassName?e.setAttribute("class",this.props.iframeClassName):e.removeAttribute("class"),this.props.opts&&this.props.opts.width?e.setAttribute("width",this.props.opts.width.toString()):e.removeAttribute("width"),this.props.opts&&this.props.opts.height?e.setAttribute("height",this.props.opts.height.toString()):e.removeAttribute("height"),this.props.title?e.setAttribute("title",this.props.title):e.setAttribute("title","YouTube video player"),this.props.loading?e.setAttribute("loading",this.props.loading):e.removeAttribute("loading")}))},this.getInternalPlayer=()=>this.internalPlayer,this.updateVideo=()=>{var e,t,r,n;if("undefined"===typeof this.props.videoId||null===this.props.videoId)return void(null==(e=this.internalPlayer)||e.stopVideo());let i=!1;const l={videoId:this.props.videoId};(null==(t=this.props.opts)?void 0:t.playerVars)&&(i=1===this.props.opts.playerVars.autoplay,"start"in this.props.opts.playerVars&&(l.startSeconds=this.props.opts.playerVars.start),"end"in this.props.opts.playerVars&&(l.endSeconds=this.props.opts.playerVars.end)),i?null==(r=this.internalPlayer)||r.loadVideoById(l):null==(n=this.internalPlayer)||n.cueVideoById(l)},this.refContainer=e=>{this.container=e},this.container=null,this.internalPlayer=null}componentDidMount(){this.createPlayer()}async componentDidUpdate(e){(function(e,t){var r,n,i,l;return e.id!==t.id||e.className!==t.className||(null==(r=e.opts)?void 0:r.width)!==(null==(n=t.opts)?void 0:n.width)||(null==(i=e.opts)?void 0:i.height)!==(null==(l=t.opts)?void 0:l.height)||e.iframeClassName!==t.iframeClassName||e.title!==t.title})(e,this.props)&&this.updatePlayer(),function(e,t){return e.videoId!==t.videoId||!M(ee
1(e.opts),ee(t.opts))}(e,this.props)&&await this.resetPlayer(),function(e,t){var r,n;if(e.videoId!==t.videoId)return!0;const i=(null==(r=e.opts)?void 0:r.playerVars)||{},l=(null==(n=t.opts)?void 0:n.playerVars)||{};return i.start!==l.start||i.end!==l.end}(e,this.props)&&this.updateVideo()}componentWillUnmount(){this.destroyPlayer()}render(){return x.createElement("div",{className:this.props.className,style:this.props.style},x.createElement("div",{id:this.props.id,className:this.props.iframeClassName,ref:this.refContainer}))}},ne=re;ne.propTypes=te,ne.defaultProps={videoId:"",id:"",className:"",iframeClassName:"",style:{},title:"",loading:void 0,opts:{},onReady:()=>{},onError:()=>{},onPlay:()=>{},onPause:()=>{},onEnd:()=>{},onStateChange:()=>{},onPlaybackRateChange:()=>{},onPlaybackQualityChange:()=>{}},ne.PlayerState={UNSTARTED:-1,ENDED:0,PLAYING:1,PAUSED:2,BUFFERING:3,CUED:5};var ie=ne,le=r(49818),se=r(50860),ae=r(59163),oe=r(75747),ce=r(46799),de=function(e){var t=e.historyData,r={title:{display:!0,position:"bottom",text:""},maintainAspectRatio:!1,responsive:!1,animation:{duration:0},hover:{animationDuration:0},responsiveAnimationDuration:0,legend:{display:!0},tooltips:{mode:"index",intersect:!1,callbacks:{label:function(e,r){var n,i,l=e.index,s=null===t||void 0===t?void 0:t[l];return"".concat(s.inning,"\u56de").concat(s.is_first?"\u8868":"\u30a6\u30e9"," ").concat(s.out_count,"\u30a2\u30a6\u30c8").concat(s.first?"\u4e00\u5841":"").concat(s.second?"\u4e8c\u5841":"").concat(s.third?"\u4e09\u5841":""," \u70b9\u5dee:").concat(Math.abs(s.lead)," \u6253\u8005:").concat(s.name," ").concat(0===e.datasetIndex?"\u5148\u653b":"\u5f8c\u653b","\u52dd\u7387:").concat(0===e.datasetIndex?null===(n=s.propability_from_first)||void 0===n?void 0:n.toFixed(3):null===(i=1-s.propability_from_first)||void 0===i?void 0:i.toFixed(3))}}},plugins:{datalabels:{color:"gray",font:{size:16}}},scales:{xAxes:[{ticks:{autoSkip:!0}}],yAxes:[{ticks:{}}]}};if(!t)return(0,s.jsx)(s.Fragment,{});var n=[{label:"\u5148\u653b\u52dd\u5229\u78ba\u7387",fill:!1,lineTension:.5,backgroundColor:"#7cb5ec",data:[],spanGaps:!0,borderColor:"#7cb5ec"},{label:"\u5f8c\u653b\u52dd\u5229\u78ba\u7387",fill:!1,lineTension:.5,backgroundColor:"#ECB37C",data:[],spanGaps:!0,borderColor:"#ECB37C"}],i=null===t||void 0===t?void 0:t.map((function(e){return"".concat(e.inning,"\u56de").concat(e.is_first?"\u8868":"\u30a6\u30e9")}));return n[0].data=null===t||void 0===t?void 0:t.map((function(e){return e.propability_from_first})),n[1].data=null===t||void 0===t?void 0:t.map((function(e){return 1-e.propability_from_first})),(0,s.jsx)(o.Z,{children:(0,s.jsx)(ce.x1,{data:{datasets:n,labels:i},height:350,width:350,options:r})})},ue=r(61362),he=function(e,t,r,i,s){var a=(0,x.useMemo)((function(){if(!e||!t||!r||!s)return null;var n=e.find((function(e){return e.name===t}));if(!n)return null;var i=Number(n.is_first),l=e.find((function(e){return Number(e.is_first)===i&&2===e.position})),a=e.find((function(e){return e.name===r}));return l&&a?{pitcher_id:n.player_id,catcher_id:l.player_id,batter_id:a.player_id}:null}),[e,t,r,s]),o=(0,Z.ZP)(a?"matchup/".concat(a.pitcher_id,"/").concat(a.catcher_id,"/").concat(a.batter_id,"/").concat(i):null,(0,n.Z)((function(){var e,t,r;return(0,l.__generator)(this,(function(n){switch(n.label){case 0:return e=h()().format("YYYY-MM-DD HH:mm:ss"),t=new URLSearchParams((0,R.Z)({pitcher_id:String(a.pitcher_id),catcher_id:String(a.catcher_id),batter_id:String(a.batter_id),before:e},i?{league_id:String(i)}:{})),[4,fetch("".concat(v.F,"/result/matchup?").concat(t))];case 1:return(r=n.sent()).ok?[2,r.json()]:[2,null]}}))}))).data;return null!==o&&void 0!==o?o:null},pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return null==e||isNaN(e)?"-":e.toFixed(t)},fe=function(e){var t=e.label,r=e.value;return(0,s.jsxs)("div",{style:{textAlign:"center",borderLeft:"1px solid #aaaaaa52",padding:"0px 4px 0px 8px"},children:[(0,s.jsx)("div",{style:{fontSize:9,color:"#64748b",marginBottom:2},children:t}),(0,s.jsx)("div",{style:{fontSize:16,color:"#f1f5f9",fontFamily:"Bebas Neue"},children:r})]})},me=function(){return(0,s.jsx)("span",{style:{fontSize:9,color:"#58a4fb",border:"1px solid #58a4fb",borderRadius:3,padding:"1px 4px"},children:"\u5c11\u306a\u3044\u30b5\u30f3\u30d7\u30eb"})},ye=function(e){var t=e.icon,r=e.title,n=e.showWarning,i=e.children;return(0,s.jsxs)("div",{style:{background:"#1e293b",borderRadius:8,padding:"10px 12px"},children:[(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:8},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,s.jsx)("span",{style:{fontSize:14},children:t}),(0,s.jsx)("span",{style:{fontSize:11,color:"#cbd5e1"},children:r})]}),n&&(0,s.jsx)(me,{})]}),(0,s.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:i})]})},ge=function(e){var t=e.members,r=e.pitcherName,n=e.batterName,i=(e.leagueId,he(t,r,n,null,!0));return i&&(i.matchup||i.battery)?(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8,paddingTop:8},children:[i.matchup&&(0,s.jsxs)(ye,{icon:"\u26be",title:"\u6253\u8005(".concat(n,") vs \u6295\u624b\uff08").concat(r,"\uff09"),showWarning:i.matchup.at_bats<5,children:[(0,s.jsx)(fe,{label:"\u6253\u6570",value:i.matchup.at_bats}),(0,s.jsx)(fe,{label:"\u6253\u7387",value:pe(i.matchup.average)}),(0,s.jsx)(fe,{label:"\u51fa\u5841\u7387",value:pe(i.matchup.obp)}),(0,s.jsx)(fe,{label:"\u9577\u6253\u7387",value:pe(i.matchup.slg)}),(0,s.jsx)(fe,{label:"\u5b89\u6253",value:i.matchup.hit}),(0,s.jsx)(fe,{label:"\u672c\u5841\u6253",value:i.matchup.homerun}),(0,s.jsx)(fe,{label:"\u4e09\u632f",value:i.matchup.strike_out}),(0,s.jsx)(fe,{label:"\u56db\u7403",value:i.matchup.four_ball})]}),i.battery&&(0,s.jsxs)(ye,{icon:"\u26be",title:"\u30d0\u30c3\u30c6\u30ea\u30fc\u76f8\u6027\uff08".concat(r," - ").concat(i.battery.name,"\uff09"),showWarning:i.battery.tpa<10,children:[(0,s.jsx)(fe,{label:"\u6253\u6570",value:i.battery.tpa}),(0,s.jsx)(fe,{label:"\u88ab\u6253\u7387",value:pe(i.battery.average)}),(0,s.jsx)(fe,{label:"\u4e8c\u5841\u6253",value:i.battery.twobase}),(0,s.jsx)(fe,{label:"\u4e09\u5841\u6253",value:i.battery.three_base}),(0,s.jsx)(fe,{label:"\u56db\u7403",value:i.battery.four_ball}),(0,s.jsx)(fe,{label:"PB",value:i.battery.pb}),(0,s.jsx)(fe,{label:"WP",value:i.battery.wp})]})]}):null},ve=r(17918),xe=r.n(ve),be=function(e){var t=e.firstCells,r=e.firstData,n=e.lastCells,i=e.lastData,l=e.players,a=e.firstTeamName,o=e.lastTeamName,c=(0,x.useCallback)((function(e){if((null===l||void 0===l?void 0:l.length)>0)return(null===l||void 0===l?void 0:l.filter((function(t){return Number(t.id)===e})))[0]}),[l]),d=(0,x.useCallback)((function(e){var t,r=function(e){for(var t=function(t){var r,l;if(!n[t]||!n[t][e])return"continue";if(i[t][e].inning!==h&&(d.push({topBottom:n[t][e].is_first?"top":"bottom",inning:h,elements:p}),h=i[t][e].inning,p=[]),u!==n[t][e].pitcher_id){var f,m,y;if(u)p.push((0,s.jsxs)("div",{className:xe().pitcherChange,children:[(0,s.jsx)("span",{className:xe().pitcherChangeIcon,children:"\u26be"}),(0,s.jsx)("span",{className:xe().pitcherChangeLabel,children:"\u6295\u624b\u4ea4\u4ee3:"}),(0,s.jsx)("span",{className:xe().pitcherName,children:null===(f=c(u))||void 0===f?void 0:f.name}),(0,s.jsx)("span",{className:xe().pitcherArrow,children:"\u2192"}),(0,s.jsx)("span",{className:xe().pitcherName,children:null===(m=c(n[t][e].pitcher_id))||void 0===m?void 0:m.name})]}));else p.push((0,s.jsxs)("div",{className:xe().pitcherChange,children:[(0,s.jsx)("span",{className:xe().pitcherChangeIcon,children:"\u26be"}),(0,s.jsxs)("span",{className:xe().pitcherChangeLabel,children:[n[t][e].is_first?o:a,"\u5148\u767a\u306f"]}),(0,s.jsx)("span",{className:xe().pitcherName,children:null===(y=c(n[t][e].pitcher_id))||void 0===y?void 0:y.name})]}));u=n[t][e].pitcher_id}p.push((0,s.jsxs)("div",{className:xe().playRow,children:[(0,s.jsxs)("div",{className:xe().playerInfo,children:[(0,s.jsxs)("span",{className:xe().battingOrder,children:[t+1,"."]}),null===(r=c(n[t][e].player_id))||void 0===r?void 0:r.name]}),(0,s.jsxs)("div",{className:xe().resultInfo,children:[n[t][e].wp>0&&(0,s.jsx)("div",{className:xe().advanceInfo,children:"\u66b4\u6295\u306b\u3088\u308b\u9032\u5841"}),n[t][e].pb>0&&(0,s.jsx)("div",{className:xe().advanceInfo,children:"\u6355\u9038\u306b\u3088\u308b\u9032\u5841"}),(0,s.jsxs)("div",{className:xe().resultLabel,children:[null===(l=se.q6.find((function(r){return r.value===n[t][e].result})))||void 0===l?void 0:l.label,i[t][e].rbi>0||i[t][e].pb>0||i[t][e].wp>0?(0,s.jsxs)("span",{className:xe().rbiBadge,children:["+",i[t][e].rbi+i[t][e].pb+i[t][e].wp]}):null]})]}),(0,s.jsxs)("div",{className:xe().baseSituation,children:[(0,s.jsxs)("span",{className:xe().outCount,children:[i[t][e].out,"\u30a2\u30a6\u30c8"]}),(0,s.jsx)("span",{className:i[t][e].first&&i[t][e].second&&i[t][e].third?xe().basesFull:xe().baseStatus,children:i[t][e].first&&i[t][e].second&&i[t][e].third?"\u6e80\u5841":[i[t][e].first?"\u4e00\u5841":"",i[t][e].second?"\u4e8c\u5841":"",i[t][e].third?"\u4e09\u5841":""].filter(
1Boolean).join("")||"\u30e9\u30f3\u30ca\u30fc\u306a\u3057"})]})]}))},r=0;r<n.length;r++)t(r)},n=e.data,i=e.cells,d=[];if(0===i.length||0===(null===l||void 0===l?void 0:l.length))return[];for(var u=0,h=1,p=[],f=0;f<20;f++)r(f);return d.push({topBottom:(null===(t=n[0][0])||void 0===t?void 0:t.is_first)?"top":"bottom",inning:h,elements:p}),d}),[l,c]),u=d({data:r,cells:t}).concat(d({data:i,cells:n})).sort((function(e,t){return e.inning===t.inning?"top"===e.topBottom?-1:1:e.inning-t.inning}));return(0,s.jsx)("div",{className:xe().container,children:0===u.length?(0,s.jsx)("div",{className:xe().emptyState,children:"\u8a66\u5408\u30c7\u30fc\u30bf\u304c\u3042\u308a\u307e\u305b\u3093"}):u.map((function(e,t){return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:xe().inningHeader,children:[(0,s.jsx)("span",{className:xe().inningNumber,children:e.inning}),"top"===e.topBottom?"\u56de\u8868":"\u56de\u88cf",":",(0,s.jsxs)("span",{className:xe().teamName,children:["top"===e.topBottom?a:o,"\u306e\u653b\u6483"]})]}),e.elements.map((function(e,t){return(0,s.jsx)("div",{children:e},t)}))]},t)}))})},_e=r(93798);var je=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.firstTeamName=t,this.lastTeamName=r}var t=e.prototype;return t.mergeAndSortByInning=function(e,t,r,n){for(var i=[],l=0;l<20;l++)for(var s=0;s<e.length;s++){var a;if(e[s]&&e[s][l]){var o=null===(a=t[s][l])||void 0===a?void 0:a.inning;o&&i.push({inning:o,isFirst:!0,data:e[s][l],cell:t[s][l],col:l,row:s})}}for(var c=0;c<20;c++)for(var d=0;d<r.length;d++){var u;if(r[d]&&r[d][c]){var h=null===(u=n[d][c])||void 0===u?void 0:u.inning;h&&i.push({inning:h,isFirst:!1,data:r[d][c],cell:n[d][c],col:c,row:d})}}return i.sort((function(e,t){return e.inning!==t.inning?e.inning-t.inning:e.isFirst===t.isFirst?0:e.isFirst?-1:1}))},t.formatRunnerStatus=function(e){return e.first&&e.second&&e.third?"\u6e80\u5841":"".concat(e.first?"\u4e00\u5841":"").concat(e.second?"\u4e8c\u5841":"").concat(e.third?"\u4e09\u5841":"")},t.formatBattingResult=function(e,t,r){var n,i="";e.wp>0&&(i+="\u76f8\u624b\u6295\u624b\u306e\u66b4\u6295\u306b\u3088\u308b\u9032\u5841/"),e.pb>0&&(i+="\u76f8\u624b\u6355\u624b\u306e\u6355\u9038\u306b\u3088\u308b\u9032\u5841/");var l,s=t.rbi+t.pb+t.wp+t.bk;return i+="".concat(null!==(l=null===(n=se.q6.find((function(t){return t.value===e.result})))||void 0===n?void 0:n.label)&&void 0!==l?l:""," ").concat(s>0?"(+".concat(s,"\u70b9)"):"")},t.generateMarkDown=function(e,t,r,n,i){var l=this.mergeAndSortByInning(e,t,r,n),s=[],a=0,o=null,c=0,d=!0,u=!1,h=void 0;try{for(var p,f=l[Symbol.iterator]();!(d=(p=f.next()).done);d=!0){var m,y,g=p.value,v=g.inning,x=g.isFirst,b=g.data,_=g.cell;c!==b.pitcher_id&&(c=b.pitcher_id),a===v&&o===x||(s.push("".concat(v).concat(x?"\u56de\u8868":"\u56de\u88cf","\n")),s.push("| \u30a4\u30cb\u30f3\u30b0 | \u6295\u624b\u540d[\u6240\u5c5e\u30c1\u30fc\u30e0] | \u6253\u8005\u540d[\u6240\u5c5e\u30c1\u30fc\u30e0] | \u6253\u5e2d\u7d50\u679c | \u8d70\u8005\u306e\u72b6\u6cc1 |\n| ---- | ---- | ---- |\n"),a=v,o=x);var j="| ".concat(v).concat(x?"\u56de\u8868":"\u56de\u88cf"," ");j+="| ".concat(null===(m=i(b.pitcher_id))||void 0===m?void 0:m.name,"[").concat(_.is_first?(0,oe.l0)(this.lastTeamName):(0,oe.l0)(this.firstTeamName),"]"),j+="| ".concat(null===(y=i(b.player_id))||void 0===y?void 0:y.name,"[").concat(_.is_first?(0,oe.l0)(this.firstTeamName):(0,oe.l0)(this.lastTeamName),"]"),j+="| ".concat(this.formatBattingResult(b,_,i)),j+="|".concat(_.out,"\u30a2\u30a6\u30c8").concat(this.formatRunnerStatus(_)," |\n"),s.push(j)}}catch(Z){u=!0,h=Z}finally{try{d||null==f.return||f.return()}finally{if(u)throw h}}return s.join("")},e}();function Ze(e){var t=e.game,r=e.members,n=(0,x.useCallback)((function(e){if(!r)return"";var t=r.find((function(t){return t.player_id===e}));return t?t.name:"Unknown"}),[r]),i=(0,x.useMemo)((function(){if(!r)return"";var e=r.find((function(e){return 2===e.position&&e.is_first===t.isTop}));return e?e.name:"Unknown"}),[r,t]),l=(0,x.useMemo)((function(){return![n(t.is1st),n(t.is2nd),n(t.is3rd)].includes(t.batter_name)&&t.batter_name}),[t,n]);return(0,s.jsxs)("div",{style:{display:"flex",height:233,width:340,backgroundImage:'url("https://s3.ap-northeast-1.wasabisys.com/capbaseball/assets/field2.jpg")',backgroundRepeat:"no-repeat",backgroundSize:400,backgroundPosition:"-18px -30px",position:"relative",overflow:"hidden",filter:t.locked?"brightness(0.5) contrast(0.8) saturate(0.6)":"none"},children:[t.is1st?(0,s.jsx)("div",{style:{position:"absolute",top:"55%",right:20,backgroundColor:"black",color:"white",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(50%)"},children:n(t.is1st)}):null,t.is2nd?(0,s.jsx)("div",{style:{position:"absolute",top:"45%",right:"50%",backgroundColor:"black",color:"white",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(50%)"},children:n(t.is2nd)}):null,t.is3rd?(0,s.jsx)("div",{style:{position:"absolute",top:"55%",left:20,backgroundColor:"black",color:"white",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(-50%)"},children:n(t.is3rd)}):null,t.pitcher_name?(0,s.jsx)("div",{style:{position:"absolute",top:"60%",left:"50%",backgroundColor:"white",color:"black",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(-50%)"},children:t.pitcher_name}):null,(0,s.jsx)("div",{style:{position:"absolute",bottom:"0%",left:"50%",backgroundColor:"white",color:"black",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(-50%)"},children:i}),l?(0,s.jsx)("div",{style:{position:"absolute",bottom:"10%",left:"40%",backgroundColor:"black",color:"white",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(-50%)"},children:t.batter_name}):null,(0,s.jsxs)("div",{style:{position:"absolute",bottom:"5%",right:-20,backgroundColor:"black",color:"white",padding:"2px 4px",borderRadius:"4px",fontSize:"12px",transform:"translateX(-50%)"},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,flexDirection:"row"},children:[(0,s.jsx)("div",{children:"B"}),[1,1,1,1].map((function(e,r){return(0,s.jsx)("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:r<t.ball?"green":"white"}})}))]}),(0,s.jsxs)("div",{style:{display:"flex",gap:4,flexDirection:"row",alignItems:"center"},children:[(0,s.jsx)("div",{children:"S"}),[1,1,1].map((function(e,r){return(0,s.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:r<t.strike?"yellow":"white"}})}))]}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"row",gap:4,alignItems:"center"},children:[(0,s.jsx)("div",{children:"O"}),[1,1,1].map((function(e,r){return(0,s.jsx)("div",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:r<t.current_out?"red":"white"}},r)}))]})]})]})}var Ce=r(98648),we=r(17122),Pe=function(e){var t=e.label,r=e.content,n=e.borderColor;return(0,s.jsxs)("div",{style:{display:"flex",gap:4,borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"#444444",padding:"1px 0"},children:[(0,s.jsx)("div",{style:{display:"flex",borderRightWidth:3,borderRightStyle:"solid",borderRightColor:n,width:12,padding:8,justifyContent:"center",alignItems:"center",fontWeight:"bold"},children:t}),(0,s.jsx)("div",{style:{padding:8},children:r})]})},Te=function(e){var t=e.game,r=e.firebaseUser,c=e.resultMembers,d=e.members,u=e.players,h=e.personalResults,p=e.first_data,f=e.last_data,m=e.teams,y=e.f_results,g=e.l_results,b=e.pitchingResult,_=e.catchingResult,j=e.currentStatus,T=e.first_cells,R=e.last_cells,B=e.battingAverages,A=e.pitchingAverages,E=e.dbUser,F=e.games,D=e.wpaHistory,G=e.guess,O=e.refreshInterval,L=(e.mutateGameInfo,(0,a.useRouter)()),M=(0,x.useState)([]),V=M[0],U=M[1],q=(0,x.useState)([]),Y=q[0],H=q[1],X=(0,x.useContext)(w.n).p_result,Q=(0,x.useContext)(C.x).c_result,J=(0,x.useState)(null),$=J[0],K=J[1],ee=(0,Z.ZP)("/player/list/3",ke).data,te=(0,i.Z)((0,Ce.Z)(),2),re=(te[0],te[1],(0,x.useState)(!1)),ne=re[0],ce=re[1],he=(0,x.useMemo)((function(){var e={menus:[]};return r&&E&&t.isEditable&&(e.menus=[{action:(0,n.Z)((function(){return(0,l.__generator)(this,(function(e){switch(e.label){case 0:return[4,fe()];case 1:return e.sent(),L.reload(),[2]}}))})),title:t.locked?"\u30ed\u30c3\u30af\u89e3\u9664":"\u8a66\u5408\u6210\u7e3e\u3092\u78ba\u5b9a",icon:t.locked?(0,s.jsx)(W.kUi,{color:"hotpink"}):(0,s.jsx)(W.jcU,{color:"deepskyblue"})},{action:function(){L.push("/game/"+L.query.game_id+"/starting_member")},title:"\u30b9\u30bf\u30e1\u30f3\u8a2d\u5b9a",icon:(0,s.jsx)(W.p4t,{color:"green"})},{action:function(){return L.push("/game/"+L.query.game_id+"/qr")},title:"\u7de8\u96c6\u8a31\u53ef",icon:(0,s.jsx)(W.Qzy,{})},{action:function(){return L.push("/game/"+L.query.game_id+"/bulk")},title:"\u90e8\u5206\u7de8\u96c6",icon:(0,s.jsx)(W.KHI,{})}]),e.menus.push({action:function(){return L.push("/game_results/"+t.league_id)},title:"\u8a66\u5408\u4e00\u89a7",icon:(0,s.jsx)(W.ZTc,{})}),e}),[r,E,t]);(0,x.useEffect)((function(){if(L.query.game_id&&d){var e=function(){var e=(0,n.Z)((function(){return(0,l.__generator)(this,(function(e){return U(c.filter((function(e){return!Boolean(Number(e.is_first))}))),H(c.filter((function(e){return Boolean(Number(e.is_first))}))),[2]}))}
1));return function(){return e.apply(this,arguments)}}();e()}}),[L,c]),(0,x.useEffect)((function(){var e=function(){var e=(0,n.Z)((function(){var e,t;return(0,l.__generator)(this,(function(r){switch(r.label){case 0:return[4,fetch("https://jcbl-score.com/api/v2/league/cap_baseball/season/3")];case 1:return[4,r.sent().json()];case 2:return e=r.sent(),1===(t=e.recentGames.filter((function(e){return e.scorebook_id===L.query.game_id}))).length&&K(t[0].youtube_id),[2]}}))}));return function(){return e.apply(this,arguments)}}();e()}),[L]);(0,x.useCallback)((function(){var e=function(){var e=(0,n.Z)((function(){var e,n,i,s,a,o;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:return r?(e=Object.assign({},null===y||void 0===y?void 0:y.runAggregate),e=Object.assign(e,null===g||void 0===g?void 0:g.runAggregate),n=[],c.forEach((function(r){var i,l,s,a,o,c,d,u,p,f,m;h&&(h[r.player_id]?n.push({player_id:r.player_id,tpa:null===(i=h[r.player_id])||void 0===i?void 0:i.tpa,at_bats:null===(l=h[r.player_id])||void 0===l?void 0:l.atBats,hit:null===(s=h[r.player_id])||void 0===s?void 0:s.hit,rbi:null===(a=h[r.player_id])||void 0===a?void 0:a.rbi,twobase:null===(o=h[r.player_id])||void 0===o?void 0:o.double,three_base:null===(c=h[r.player_id])||void 0===c?void 0:c.triple,strike_out:null===(d=h[r.player_id])||void 0===d?void 0:d.strike_out,homerun:null===(u=h[r.player_id])||void 0===u?void 0:u.homerun,teamId:Boolean(Number(r.is_first))?t.first_team:t.last_team,four_ball:(null===(p=h[r.player_id])||void 0===p?void 0:p.fourball)+(null===(f=h[r.player_id])||void 0===f?void 0:f.intentional),run:null!==(m=e[r.player_id])&&void 0!==m?m:0}):n.push({player_id:r.player_id,tpa:0,at_bats:0,hit:0,rbi:0,twobase:0,three_base:0,strike_out:0,homerun:0,teamId:Boolean(Number(r.is_first))?t.first_team:t.last_team,four_ball:0,run:0}))})),i={game_id:L.query.game_id,results:n},a={},[4,r.getIdToken()]):[3,3];case 1:return a.Authorization=l.sent(),a.Accept="application/json",a["Content-Type"]="application/json",s=a,[4,fetch(v.F+"/batting_sum/"+L.query.game_id,{method:"POST",headers:s,body:JSON.stringify(i)})];case 2:200!==(o=l.sent()).status&&alert("\u6253\u6483\u7d50\u679c\u306e\u96c6\u8a08\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002".concat(le.S[o.status])),l.label=3;case 3:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();e()}),[L,r,h,t,y,g]),(0,x.useCallback)((function(){var e=function(){var e=(0,n.Z)((function(){var e,n,i,s,a;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:e={},l.label=1;case 1:return l.trys.push([1,4,,5]),b.forEach((function(r){e[r.pitcher_id]={runs:Boolean(Number(r.is_first))?null===y||void 0===y?void 0:y.pitchingResults[r.pitcher_id].runs:null===g||void 0===g?void 0:g.pitchingResults[r.pitcher_id].runs,er:X.current[r.pitcher_id].er,inning:X.current[r.pitcher_id].inning,win:X.current[r.pitcher_id].win,lose:X.current[r.pitcher_id].lose,save:X.current[r.pitcher_id].save,hold:X.current[r.pitcher_id].hold,team_id:Boolean(Number(r.is_first))?t.first_team:t.last_team}})),n={result:e},s={},[4,r.getIdToken()];case 2:return s.Authorization=l.sent(),s.Accept="application/json",s["Content-Type"]="application/json",i=s,[4,fetch(v.F+"/pitching_sum/"+L.query.game_id,{method:"POST",headers:i,body:JSON.stringify(n)})];case 3:return l.sent(),L.reload(),[3,5];case 4:return a=l.sent(),console.error(a),alert("\u5168\u3066\u306e\u9805\u76ee\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),[3,5];case 5:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();e()}),[L,X,b,y,g,r,t]),(0,x.useCallback)((function(){var e=function(){var e=(0,n.Z)((function(){var e,n,i,s,a;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:e={},l.label=1;case 1:return l.trys.push([1,4,,5]),_.forEach((function(r){e[r.catcher_id]={runs:Boolean(Number(r.is_first))?null===y||void 0===y?void 0:y.catchingResults[r.catcher_id].runs:null===g||void 0===g?void 0:g.catchingResults[r.catcher_id].runs,er:Q.current[r.catcher_id].er,inning:Q.current[r.catcher_id].inning,win:Q.current[r.catcher_id].win,lose:Q.current[r.catcher_id].lose,save:Q.current[r.catcher_id].save,hold:0,team_id:Boolean(Number(r.is_first))?t.first_team:t.last_team}})),n={c_result:e},s={},[4,r.getIdToken()];case 2:return s.Authorization=l.sent(),s.Accept="application/json",s["Content-Type"]="application/json",i=s,[4,fetch(v.F+"/catching_sum/"+L.query.game_id,{method:"POST",headers:i,body:JSON.stringify(n)})];case 3:return l.sent(),[3,5];case 4:return a=l.sent(),console.error(a),alert("\u5168\u3066\u306e\u9805\u76ee\u3092\u30bb\u30c3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002"),[3,5];case 5:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}();e()}),[L,Q,_,y,g,r,t]);var pe,fe=(0,x.useCallback)((0,n.Z)((function(){var e,t,n,i;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:if(!r)return[2];l.label=1;case 1:return l.trys.push([1,4,,5]),t={},[4,r.getIdToken()];case 2:return t.Authorization=l.sent(),t.Accept="application/json",t["Content-Type"]="application/json",e=t,[4,fetch(v.F+"/aggregate/"+L.query.game_id,{method:"POST",headers:e})];case 3:return 200!==(n=l.sent()).status&&alert("\u6210\u7e3e\u306e\u96c6\u8a08\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002".concat(le.S[n.status])),[3,5];case 4:return i=l.sent(),console.error(i),alert("\u6210\u7e3e\u306e\u96c6\u8a08\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002"),[3,5];case 5:return[2]}}))})),[L,r]),me=(0,x.useMemo)((function(){var e=t.pitching.find((function(e){return e.win>0}));if(e){var r=t.pitchingWins.find((function(t){return t.player_id===(null===e||void 0===e?void 0:e.pitcher_id)}));if(r){var n=[];return r.win+r.this_game_win>0&&n.push("".concat(r.win+r.this_game_win,"\u52dd")),r.lose+r.this_game_lose>0&&n.push("".concat(r.lose+r.this_game_lose,"\u6557")),r.save+r.this_game_save>0&&n.push("".concat(r.save+r.this_game_save,"S")),"".concat(null===r||void 0===r?void 0:r.name," ").concat(n.join(" "))}}}),[t]),ye=(0,x.useMemo)((function(){var e=t.pitching.find((function(e){return e.save>0}));if(e){var r=t.pitchingWins.find((function(t){return t.player_id===(null===e||void 0===e?void 0:e.pitcher_id)}));if(r){var n=[];return r.win+r.this_game_win>0&&n.push("".concat(r.win+r.this_game_win,"\u52dd")),r.lose+r.this_game_lose>0&&n.push("".concat(r.lose+r.this_game_lose,"\u6557")),r.save+r.this_game_save>0&&n.push("".concat(r.save+r.this_game_save,"S")),"".concat(null===r||void 0===r?void 0:r.name," ").concat(n.join(" "))}}}),[t]),ve=(0,x.useMemo)((function(){var e=t.pitching.find((function(e){return e.lose>0}));if(e){var r=t.pitchingWins.find((function(t){return t.player_id===(null===e||void 0===e?void 0:e.pitcher_id)}));if(r){var n=[];return r.win+r.this_game_win>0&&n.push("".concat(r.win+r.this_game_win,"\u52dd")),r.lose+r.this_game_lose>0&&n.push("".concat(r.lose+r.this_game_lose,"\u6557")),r.save+r.this_game_save>0&&n.push("".concat(r.save+r.this_game_save,"S")),"".concat(null===r||void 0===r?void 0:r.name," ").concat(n.join(" "))}}}),[t]),xe=(0,x.useMemo)((function(){var e=[];return t.homerunDetails.forEach((function(t){for(var r=0;r<t.homerun;r++)e.push(t.name+" "+(r+1+t.before_homerun_count)+"\u53f7")})),e.join(" , ")}),[t]),Te=(0,x.useCallback)((function(e){if((null===u||void 0===u?void 0:u.length)>0)return(null===u||void 0===u?void 0:u.filter((function(t){return Number(t.id)===e})))[0]}),[u]),Se=(0,x.useMemo)((function(){var e,t,r,n,i,l=[];if(!G)return[];if(!b||!_)return[];(null===(e=b.find((function(e){return 1===e.win})))||void 0===e?void 0:e.pitcher_id)!==G.winPitcherId&&G.winPitcherId&&l.push("\u52dd\u3061\u6295\u624b\u306f".concat(null===(n=Te(G.winPitcherId))||void 0===n?void 0:n.name,"\u3067\u3059"));(null===(t=b.find((function(e){return 1===e.lose})))||void 0===t?void 0:t.pitcher_id)!==G.losePitcherId&&G.losePitcherId&&l.push("\u8ca0\u3051\u6295\u624b\u306f".concat(null===(i=Te(G.losePitcherId))||void 0===i?void 0:i.name,"\u3067\u3059"));var s,a,o,c=null===(r=b.find((function(e){return 1===e.save})))||void 0===r?void 0:r.pitcher_id;(null!==c&&void 0!==c?c:null)!==(null!==(s=G.savePitcherId)&&void 0!==s?s:null)&&((null===(a=Te(G.savePitcherId))||void 0===a?void 0:a.name)?l.push("\u30bb\u30fc\u30d6\u6295\u624b\u306f".concat(null===(o=Te(G.savePitcherId))||void 0===o?void 0:o.name,"\u3067\u3059")):l.push("\u30bb\u30fc\u30d6\u6295\u624b\u306f\u3044\u307e\u305b\u3093\u3002"));return null===b||void 0===b||b.forEach((function(e){var t,r=e.is_first?y:g;e.er!==r.pitchingResults[e.pitcher_id].er&&l.push("\u6295\u624b".concat(null===(t=Te(e.pitcher_id))||void 0===t?void 0:t.name,"\u306e\u81ea\u8cac\u70b9\u306f").concat(r.pitchingResults[e.pitcher_id].er,"\u70b9\u3067\u3059"))})),null===_||void 0===_||_.forEach((function(e){var t,r=e.is_first?y:g;e.er!==r.catchingResults[e.catcher_id].runsByPb&&l.push("\u6355\u624b".concat(null===(t=Te(e.catcher_id))||void 0===t?void 0:t.name,"\u306e\u81ea\u8cac\u70b9\u306f").concat(r.catchingResults[e.catcher_id].runsByPb,"\u70b9\u3067\u3059"))})),l}),[G,Te,t,b,_,y,g]),Ne=(0,x.useMemo)((function(){var e,r,n="";return null===(r=null===(e=t.summary)||void 0===e?void 0:e.filter((function(e){return e.my_team_run+e.bes<=e.opponent_team_run})))||void 0===r||r.forEach((function(e){var t;n+="".concat(e.inning,"\u56de").concat(e.is_first?"\u8868":"\u88cf"," ").concat(e.my_team_run+e.bes+"-"+e.opponent_team_run,"\n      ").concat(e.out_count,"\u30a2\u30a6\u30c8").concat(e.first?"\u4e00\u5841":"").concat(e.second?"\u4e8c\u5841":"").concat(e.third?"\u4e09\u5841":"","\u3067\n      ").concat(e.name,"\u304c").concat(e.rbi>1?e.rbi+"\u70b9":"").concat(null===(t=null===se.q6||void 0===se.q6?void 0:se.q6.find((function(t){return t.value===e.result})))||void 0===t?void 0:t.label,"\u3067").concat(function(){if(e.my_team_run+e.bes<e.opponent_team_run){if
1(e.my_team_run+e.rbi+e.bes===e.opponent_team_run)return"\u540c\u70b9";if(e.my_team_run+e.rbi+e.bes>e.opponent_team_run)return"\u9006\u8ee2"}if(e.my_team_run+e.bes===e.opponent_team_run)return 0===e.my_team_run?"\u5148\u5236":"\u52dd\u3061\u8d8a\u3057"}(),"\u3002\n")})),n}),[t.summary]),Ie=(0,x.useMemo)((function(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ze,{members:d,game:t}),(0,s.jsx)(ge,{members:d,pitcherName:t.pitcher_name,batterName:t.batter_name,leagueId:t.league_id})]})}),[d,t]),Re=(0,x.useMemo)((function(){return new je(t.first_team_name,t.last_team_name)}),[t.first_team_name,t.last_team_name]),Be=(0,x.useCallback)((0,n.Z)((function(){var e,t,n,i;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:if(!r)return[2];ce(!0),l.label=1;case 1:return l.trys.push([1,4,5,6]),t={},[4,r.getIdToken()];case 2:return t.Authorization=l.sent(),t.Accept="application/json",t["Content-Type"]="application/json",e=t,[4,fetch(v.F+"/game/".concat(L.query.game_id,"/ai_summary"),{method:"POST",headers:e})];case 3:return(n=l.sent()).ok?(alert("AI\u306b\u3088\u308b\u8a66\u5408\u8981\u7d04\u3092\u751f\u6210\u3057\u307e\u3057\u305f\u3002"),L.reload(),[3,6]):(alert("AI\u306b\u3088\u308b\u8a66\u5408\u8981\u7d04\u306e\u751f\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002".concat(le.S[n.status])),[2]);case 4:return i=l.sent(),console.error("AI\u8981\u7d04\u751f\u6210\u30a8\u30e9\u30fc:",i),alert("AI\u306b\u3088\u308b\u8a66\u5408\u8981\u7d04\u306e\u751f\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002"),[3,6];case 5:return ce(!1),[7];case 6:return[2]}}
1))})),[Re,t,p,T,f,R,L,r,Te]),Ae=(0,x.useMemo)((function(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,s.jsx)("div",{style:{fontSize:14,color:"white"},children:(0,oe.l0)(t.first_team_name)}),(0,s.jsx)("div",{style:{color:"orange",fontSize:12},children:"\u6253\u6483\u6210\u7e3e"})]}),(0,s.jsx)(z,{game:t,players:u,members:V,resultCell:p,cellData:T,team:t.first_team,runAggregate:null===y||void 0===y?void 0:y.runAggregate,is_first:!0,teams:m,personalResults:h,pitchingAggregate:null===g||void 0===g?void 0:g.pitchingResults,catchingAggregate:null===g||void 0===g?void 0:g.catchingResults,battingAverages:B,pitchingAverages:A,pitchingResult:b,catchingResult:_,firebaseUser:r,dbUser:E,bureauData:ee,guess:G}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,s.jsx)("div",{style:{fontSize:14,color:"white"},children:(0,oe.l0)(t.last_team_name)}),(0,s.jsx)("div",{style:{color:"orange",fontSize:12},children:"\u6253\u6483\u6210\u7e3e"})]}),(0,s.jsx)(z,{firebaseUser:r,game:t,players:u,members:Y,runAggregate:null===g||void 0===g?void 0:g.runAggregate,resultCell:f,cellData:R,team:t.last_team,is_first:!1,teams:m,personalResults:h,pitchingAggregate:null===y||void 0===y?void 0:y.pitchingResults,catchingAggregate:null===y||void 0===y?void 0:y.catchingResults,battingAverages:B,pitchingAverages:A,pitchingResult:b,catchingResult:_,dbUser:E,bureauData:ee,guess:G})]})}),[ee,t,p,f,V,Y,y,g,u,h,B,A,b,_,G]);return 0!==(null===u||void 0===u?void 0:u.length)&&0!==c.length&&t&&0!==m.length&&y&&g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(o.Z,{style:{backgroundColor:"#0f172a",minHeight:"100vh",padding:16},children:[(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(I.Z,{games:F}),(0,s.jsx)(S.Z,{currentStatus:j,first_results:y,last_results:g,game:t}),(0,s.jsx)(N.Z,{firstResults:y,lastResults:g,locked:Boolean(t.locked)})]}),(0,s.jsx)("div",{style:{background:"#1e293b",borderRadius:12,padding:16,fontSize:12},children:t.locked?(0,s.jsxs)(s.Fragment,{children:[me?(0,s.jsx)(Pe,{label:"\u52dd",content:me,borderColor:"#64C430"}):(0,s.jsx)(s.Fragment,{}),ve?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Pe,{label:"\u6557",content:ve,borderColor:"#a05252"})}):(0,s.jsx)(s.Fragment,{}),ye?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Pe,{label:"S",content:ye,borderColor:"#c4c464"})}):(0,s.jsx)(s.Fragment,{}),t.homerunDetails.length>0?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Pe,{label:"HR",content:xe,borderColor:"#b0812c"})}):(0,s.jsx)(s.Fragment,{})]}):(0,s.jsx)(we.Z,{refreshInterval:O,isEnabled:!(null===t||void 0===t?void 0:t.locked),backgroundColor:"black",fillColor:"#19b8e0",height:2})}),r&&E&&t.locked?Se.map((function(e){return(0,s.jsxs)("div",{style:{backgroundColor:"#d73438",padding:2,fontSize:12,marginBottom:2,display:"flex",alignItems:"center",gap:4},children:[(0,s.jsx)(W.iNY,{size:12}),e]})})):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(ue.Z,{tabs:[{tabTitle:"LIVE",component:Ie},{tabTitle:"\u6210\u7e3e",component:Ae},{tabTitle:"\u8a66\u5408\u7d4c\u904e",component:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(be,{firstData:p,firstCells:T,lastData:f,lastCells:R,firstTeamName:t.first_team_name,lastTeamName:t.last_team_name,players:u}),(0,s.jsxs)("div",{style:{display:"flex",gap:"8px",padding:"12px",flexWrap:"wrap"},children:[(0,s.jsx)("button",{onClick:(0,n.Z)((function(){var e;return(0,l.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,navigator.clipboard.writeText("\u5148\u653b ".concat(t.first_team_name,", \u5f8c\u653b").concat(t.last_team_name,"\n")+Re.generateMarkDown(p,T,f,R,Te))];case 1:return r.sent(),console.log("Page URL copied to clipboard"),[3,3];case 2:return e=r.sent(),console.error("Failed to copy: ",e),[3,3];case 3:return[2]}}
1))})),style:{padding:"8px 16px",background:"#2a2a2a",color:"#5e9e5e",border:"1px solid #3a3a3a",borderRadius:"6px",cursor:"pointer",fontSize:"13px"},children:"markdown\u3067\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u30b3\u30d4\u30fc"}),(0,s.jsx)("button",{disabled:!t.locked||!!t.ai_summary||!t.isEditable||ne,onClick:(0,n.Z)((function(){return(0,l.__generator)(this,(function(e){switch(e.label){case 0:return[4,Be()];case 1:return e.sent(),[2]}}))})),style:{padding:"8px 16px",background:t.locked&&!t.ai_summary&&t.isEditable&&!ne?"#2a2a2a":"#1a1a1a",color:t.locked&&!t.ai_summary&&t.isEditable&&!ne?"#5e9e5e":"#666",border:"1px solid #3a3a3a",borderRadius:"6px",cursor:t.locked&&!t.ai_summary&&t.isEditable&&!ne?"pointer":"not-allowed",fontSize:"13px",display:"flex",alignItems:"center",gap:"6px"},children:ne?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(W.fCD,{style:{animation:"spin 1s linear infinite"}}),"AI\u751f\u6210\u4e2d..."]}):"AI\u306b\u8a66\u5408\u6982\u8981\u4f5c\u6210\u3092\u30ea\u30af\u30a8\u30b9\u30c8"})]})]})},{tabTitle:"\u914d\u4fe1\u30d1\u30fc\u30c4",component:(0,s.jsx)("a",{href:"/game/".concat(t.game_id,"/overlay"),target:"_blank",children:"\u914d\u4fe1\u30aa\u30fc\u30d0\u30ec\u30a4\u753b\u9762"})}]}),(0,s.jsxs)(P.Z,{style:{fontSize:12,textAlign:"right",marginRight:10,color:"gray"},children:["\u30b9\u30b3\u30a2\u5165\u529b: ",t.author,(0,s.jsx)("br",{}),(null===t||void 0===t?void 0:t.co_authors)?"\u5171\u540c\u7de8\u96c6:"+(null===t||void 0===t?void 0:t.co_authors):""]})]}),(0,s.jsx)(de,{historyData:null!==D&&void 0!==D?D:[]}),(t.ai_summary||Ne)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{style:{backgroundColor:"white",padding:4,color:"black"},children:t.ai_summary?"AI\u306b\u3088\u308b\u8a66\u5408\u6982\u8981":"\u8a66\u5408\u6982\u8981"}),(0,s.jsx)("div",{style:{whiteSpace:"pre-wrap",fontSize:12,padding:8,color:"#CCC",lineHeight:1.5},children:null!==(pe=t.ai_summary)&&void 0!==pe?pe:Ne})]}),$?(0,s.jsxs)("div",{style:{marginTop:20},children:[(0,s.jsx)("div",{style:{position:"fixed",backgroundColor:"white",padding:4,color:"black"},children:"\u8a66\u5408\u52d5\u753b"}),(0,s.jsx)(ie,{videoId:$})]}):(0,s.jsx)(s.Fragment,{}),(0,s.jsx)(ae.Z,{menus:he.menus}),(0,s.jsx)(_e.$,{fixed:!1}),(0,s.jsx)(o.Z,{style:{height:90}})]}):(0,s.jsx)(o.Z,{children:(0,s.jsx)(k(),{href:"/game/"+L.query.game_id+"/1/1/1",children:r?"\u8a66\u5408\u958b\u59cb\u3092\u3059\u308b":"\u8a66\u5408\u958b\u59cb\u524d"})})},ke=function(){var e=(0,n.Z)((function(){return(0,l.__generator)(this,(function(e){switch(e.label){case 0:return[4,fetch(v.DW+"/player/list/3")];case 1:return[4,e.sent().json()];case 2:return[2,e.sent()]}}))}));return function(){return e.apply(this,arguments)}}(),Se=r(7499),Ne=r(4666),Ie=r.n(Ne),Re=function(){return(0,s.jsxs)("div",{className:Ie().skeletonContainer,children:[(0,s.jsx)("div",{className:"".concat(Ie().scoreboard," ").concat(Ie().pulse)}),(0,s.jsx)("div",{className:"".concat(Ie().tab," ").concat(Ie().pulse)}),(0,s.jsx)("div",{className:"".concat(Ie().card," ").concat(Ie().pulse)}),(0,s.jsx)("div",{className:"".concat(Ie().card," ").concat(Ie().pulse)})]})},Be=[{label:"",value:0,tpa:0,atBats:0},{label:"K",value:1,tpa:1,atBats:1,strike_out:1},{label:"BB",value:2,tpa:1,atBats:0,fourball:1},{label:"G",value:3,tpa:1,atBats:1,hit:0},{label:"F",value:4,tpa:1,atBats:1,hit:0},{label:"1BH",value:5,tpa:1,atBats:1,single:1,hit:1},{label:"2BH",value:6,tpa:1,atBats:1,double:1,hit:1},{label:"3BH",value:7,tpa:1,atBats:1,triple:1,hit:1},{label:"HR",value:8,tpa:1,atBats:1,homerun:1,hit:1},{label:"E",value:9,tpa:1,atBats:0,hit:0},{label:"DP",value:10,tpa:1,atBats:0,hit:0},{label:"\ua4d8'",value:11,tpa:1,atBats:1,hit:0,strike_out:1},{label:"DB",value:12,tpa:1,atBats:0,fourball:1},{label:"2BE",value:13,tpa:1,atBats:1,hit:0},{label:"3BE",value:14,tpa:1,atBats:1,hit:0},{label:"IF",value:15,tpa:1,atBats:0,hit:0},{label:"IP",value:16,tpa:1,atBats:1,hit:0},{label:"IB",value:17,tpa:1,atBats:0,hit:0,fourball:1}],Ae=function(){var e=(0,a.useRouter)(),t=(0,i.Z)((0,g.Z)(),2),r=t[0],u=t[1],x=(0,i.Z)((0,y.Z)(r,6e4),2),C=x[0],w=x[1],P=(0,i.Z)((0,j.Z)(null===C||void 0===C?void 0:C.league_id),2),T=P[0],k=P[1],S=(0,i.Z)((0,p.Z)(),2),N=S[0],I=S[1],R=(0,i.Z)((0,f.Z)(),1)[0],B=(0,i.Z)((0,m.Z)(),1)[0],A=(0,i.Z)(b(),1)[0],E=(0,i.Z)(_(),1)[0],F=(0,i.Z)((0,Se.Z)(),1)[0],D=(0,d.Z)(),G=D.first_data,W=D.last_data,O=D.f_results,z=D.l_results,L=D.first_cells,M=D.last_cells,V=D.currentStatus,U=D.personalResults,q=D.guess,Y=(0,Z.ZP)("wpa_history"+e.query.game_id,(0,n.Z)((function(){return(0,l.__generator)(this,(function(t){switch(t.label){case 0:return[4,fetch(v.F+"/wpa_history/"+e.query.game_id)];case 1:return[4,t.sent().json()];case 2:return[2,t.sent()]}}))}))).data;return(0,s.jsxs)(o.Z,{children:[C?(0,s.jsx)(Te,{refreshInterval:6e4,guess:q,currentStatus:V,game:C,firebaseUser:r,dbUser:u,members:N,resultMembers:I,players:R,personalResults:U,first_data:G,last_data:W,teams:B,f_results:O,l_results:z,pitchingResult:A,catchingResult:E,first_cells:L,last_cells:M,battingAverages:T,pitchingAverages:k,games:F,wpaHistory:Y,mutateGameInfo:w}):(0,s.jsx)(Re,{}
1),C&&(0,s.jsx)(c.Z,{image:"https://cap-scorebook.com/api/ogp/game?game_id=".concat(C.game_id),description:h()(C.game_date).format("YYYY/MM/DD")+" "+(0,oe.l0)(C.first_team_name)+"-"+(0,oe.l0)(C.last_team_name),title:h()(C.game_date).format("YYYY/MM/DD")+" "+(0,oe.l0)(C.first_team_name)+"-"+(0,oe.l0)(C.last_team_name)})]})}},17918:function(e){e.exports={container:"GameProgressComponent_container__jsWR3",inningHeader:"GameProgressComponent_inningHeader___qNzE",inningNumber:"GameProgressComponent_inningNumber__Sat4R",teamName:"GameProgressComponent_teamName__TY_ey",pitcherChange:"GameProgressComponent_pitcherChange__VEzXz",pitcherChangeIcon:"GameProgressComponent_pitcherChangeIcon__C7RhG",pitcherChangeLabel:"GameProgressComponent_pitcherChangeLabel__5az90",pitcherName:"GameProgressComponent_pitcherName__bpqWi",pitcherArrow:"GameProgressComponent_pitcherArrow__g8Djh",playRow:"GameProgressComponent_playRow__ImLaP",playerInfo:"GameProgressComponent_playerInfo__Aa4ky",battingOrder:"GameProgressComponent_battingOrder__Iz37b",resultInfo:"GameProgressComponent_resultInfo__C0hEe",advanceInfo:"GameProgressComponent_advanceInfo__rgJac",resultLabel:"GameProgressComponent_resultLabel__ayhS8",rbiBadge:"GameProgressComponent_rbiBadge__vsLPb",baseSituation:"GameProgressComponent_baseSituation__q0gKA",outCount:"GameProgressComponent_outCount__TuSye",baseStatus:"GameProgressComponent_baseStatus__6lFTd",basesFull:"GameProgressComponent_basesFull__Sv5XN",emptyState:"GameProgressComponent_emptyState__DpMhD"}},4666:function(e){e.exports={skeletonContainer:"SkeletonGameDetail_skeletonContainer__Nh3uY",pulse:"SkeletonGameDetail_pulse__CLH_s",scoreboard:"SkeletonGameDetail_scoreboard__psZjQ",tab:"SkeletonGameDetail_tab__dO6Te",card:"SkeletonGameDetail_card__L9dUn"}},9008:function(e,t,r){e.exports=r(5443)},24320:function(e,t,r){"use strict";var n=r(56627);function i(){}function l(){}l.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,l,s){if(s!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:l,resetWarningCache:i}
1;return r.PropTypes=r,r}},76853:function(e,t,r){e.exports=r(24320)()},56627:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},33988:function(e){"use strict";var t;t=function(){var e={},t={};return e.on=function(e,r){var n={name:e,handler:r};return t[e]=t[e]||[],t[e].unshift(n),n},e.off=function(e){var r=t[e.name].indexOf(e);-1!==r&&t[e.name].splice(r,1)},e.trigger=function(e,r){var n,i=t[e];if(i)for(n=i.length;n--;)i[n].handler(r)},e},e.exports=t},66006:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(22275),l=(n=i)&&n.__esModule?n:{default:n};t.default={pauseVideo:{acceptableStates:[l.default.ENDED,l.default.PAUSED],stateChangeRequired:!1},playVideo:{acceptableStates:[l.default.ENDED,l.default.PLAYING],stateChangeRequired:!1},seekTo:{acceptableStates:[l.default.ENDED,l.default.PLAYING,l.default.PAUSED],stateChangeRequired:!0,timeout:3e3}},e.exports=t.default},89125:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(r(9215)),i=a(r(28255)),l=a(r(65279)),s=a(r(66006));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("youtube-player"),c={proxyEvents:function(e){var t={},r=function(r){var n="on"+r.slice(0,1).toUpperCase()+r.slice(1);t[n]=function(t){o('event "%s"',n,t),e.trigger(r,t)}},n=!0,i=!1,s=void 0;try{for(var a,c=l.default[Symbol.iterator]();!(n=(a=c.next()).done);n=!0){r(a.value)}}catch(d){i=!0,s=d}finally{try{!n&&c.return&&c.return()}finally{if(i)throw s}}return t},promisifyPlayer:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={},n=function(n){t&&s.default[n]?r[n]=function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.then((function(e){var t=s.default[n],i=e.getPlayerState(),l=e[n].apply(e,r);return t.stateChangeRequired||Array.isArray(t.acceptableStates)&&-1===t.acceptableStates.indexOf(i)?new Promise((function(r){e.addEventListener("onStateChange",(function n(){var i=e.getPlayerState(),l=void 0;"number"===typeof t.timeout&&(l=setTimeout((function(){e.removeEventListener("onStateChange",n),r()}),t.timeout)),Array.isArray(t.acceptableStates)&&-1!==t.acceptableStates.indexOf(i)&&(e.removeEventListener("onStateChange",n),clearTimeout(l),r())}))})).then((function(){return l})):l}))}:r[n]=function(){for(var t=arguments.length,r=Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.then((function(e){return e[n].apply(e,r)}))}},l=!0,a=!1,o=void 0;try{for(var c,d=i.default[Symbol.iterator]();!(l=(c=d.next()).done);l=!0){var u=c.value;n(u)}}catch(h){a=!0,o=h}finally{try{!l&&d.return&&d.return()}finally{if(a)throw o}}return r}};t.default=c,e.exports=t.default},22275:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={BUFFERING:3,ENDED:0,PAUSED:2,PLAYING:1,UNSTARTED:-1,VIDEO_CUED:5},e.exports=t.default},65279:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["ready","stateChange","playbackQualityChange","playbackRateChange","error","apiChange","volumeChange"],e.exports=t.default},28255:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["cueVideoById","loadVideoById","cueVideoByUrl","loadVideoByUrl","playVideo","pauseVideo","stopVideo","getVideoLoadedFraction","cuePlaylist","loadPlaylist","nextVideo","previousVideo","playVideoAt","setShuffle","setLoop","getPlaylist","getPlaylistIndex","setOption","mute","unMute","isMuted","
1setVolume","getVolume","seekTo","getPlayerState","getPlaybackRate","setPlaybackRate","getAvailablePlaybackRates","getPlaybackQuality","setPlaybackQuality","getAvailableQualityLevels","getCurrentTime","getDuration","removeEventListener","getVideoUrl","getVideoEmbedCode","getOptions","getOption","addEventListener","destroy","setSize","getIframe"],e.exports=t.default},11062:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=a(r(33988)),l=a(r(55900)),s=a(r(89125));function a(e){return e&&e.__esModule?e:{default:e}}var o=void 0;t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=(0,i.default)();if(o||(o=(0,l.default)(a)),t.events)throw new Error("Event handlers cannot be overwritten.");if("string"===typeof e&&!document.getElementById(e))throw new Error('Element "'+e+'" does not exist.');t.events=s.default.proxyEvents(a);var c=new Promise((function(r){"object"===("undefined"===typeof e?"undefined":n(e))&&e.playVideo instanceof Function?r(e):o.then((function(n){var i=new n.Player(e,t);return a.on("ready",(function(){r(i)})),null}))})),d=s.default.promisifyPlayer(c,r);return d.on=a.on,d.off=a.off,d},e.exports=t.default},55900:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i=r(49090),l=(n=i)&&n.__esModule?n:{default:n};t.default=function(e){return new Promise((function(t){if(window.YT&&window.YT.Player&&window.YT.Player instanceof Function)t(window.YT);else{var r="http:"===window.location.protocol?"http:":"https:";(0,l.default)(r+"//www.youtube.com/iframe_api",(function(t){t&&e.trigger("error",t)}));var n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=function(){n&&n(),t(window.YT)}}}))},e.exports=t.default},9215:function(e,t,r){var n=r(83454);function i(){var e;try{e=t.storage.debug}catch(r){}return!e&&"undefined"!==typeof n&&"env"in n&&(e=n.env.DEBUG),e}(t=e.exports=r(55046)).log=function(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),!r)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,l=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(l=i))})),e.splice(l,0,n)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(r){}},t.load=i,t.useColors=function(){if("undefined"!==typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},t.enable(i())},55046:function(e,t,r){var n;function i(e){function r(){if(r.enabled){var e=r,i=+new Date,l=i-(n||i);e.diff=l,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!==typeof s[0]&&s.unshift("%O");var o=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;o++;var i=t.formatters[n];if("function"===typeof i){var l=s[o];r=i.call(e,l),s.splice(o,1),o--}return r})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"===typeof t.init&&t.init(r),r}
1(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"===typeof e?e:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(e=r[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(14680),t.names=[],t.skips=[],t.formatters={}},14680:function(e){var t=1e3,r=60*t,n=60*r,i=24*n,l=365.25*i;function s(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}e.exports=function(e,a){a=a||{};var o,c=typeof e;if("string"===c&&e.length>0)return function(e){if((e=String(e)).length>100)return;var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!s)return;var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*l;case"days":case"day":case"d":return a*i;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*r;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===c&&!1===isNaN(e))return a.long?s(o=e,i,"day")||s(o,n,"hour")||s(o,r,"minute")||s(o,t,"second")||o+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=n)return Math.round(e/n)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}},function(e){e.O(0,[4885,3737,5937,260,8698,4915,8100,7177,1696,6842,8602,8771,6799,6066,5747,1161,860,6275,1712,9774,2888,179],(function(){return t=15919,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.