1import{_ as E,a as D}from"./BTabs.vue_vue_type_script_setup_true_lang-DLiTxhnf-o10XBFcD.js";import{N as $}from"./NoSidebar-C9FRo4oq.js";import{_ as k,o as a,c as i,d as e,t as r,b as y,h as g,F as f,e as b,n as N,r as x,f as p,i as R,j as B,w as T,a as P}from"./app-B3NAHgzv.js";import{H as G}from"./Headshot-umtKCMHe.js";import{P as V}from"./PageHead-C8PgOCx8.js";import{I as W,P as M}from"./InsticatorComments-DNIjUtJC.js";import"./Footer-C-FJr0-7.js";import"./Dropdown-cJ0mqfg2.js";import"./APIServices-Cm7rktZy.js";import"./TableSelect-9nohRrHz.js";import"./BTable.vue_vue_type_script_setup_true_lang-Bt6RZiSw-DrWPlKrw.js";import"./event-a_bi5ysw-DciaygOK.js";import"./BFormInput.vue_vue_type_script_setup_true_lang-BYRauOFP-De1VSk-Y.js";import"./BPagination.vue_vue_type_script_setup_true_lang-CTBtCOPA-BJyQmNZR.js";const X={name:"Head",components:{},props:{game:{type:Object},game_scroll_data:{type:Object},view:{type:String,default:"box"},page:{type:Object}},data(){return{game_data:{},header:{}}},watch:{},methods:{update_game_data(o){this.game_data=o}},created(){},computed:{},mounted(){this.update_game_data(this.game_scroll_data),this.game.hasOwnProperty("header")?this.header=this.game.header:this.game_scroll_data.hasOwnProperty("header")&&(this.header=this.game_scroll_data.header)}},U={class:"boxheader w-100 m-0 mb-2 p-2 border border-gray row box-head-text rounded text-large bg-white"},z={key:0,class:"col-1 icon"},K=["src"],Y={key:1,class:"col-1 icon"},q={class:"col align-self-center text-bold text-large ps-1 pe-1 text-team"},J={key:0,class:"me-1"},Q={class:"text-nowrap"},Z={key:2,class:"col align-self-center text-bold text-end scoretext"},tt={key:3,class:"col align-self-center text-bold text-end scoretext"},et={key:4,class:"col text-center align-self-center text-bold text-theme-secondary"},st={key:0},ot={key:0},nt={key:1},at={key:5,class:"col align-self-center text-center text-bold text-theme-secondary gstatus"},lt={key:6,class:"col align-self-center scoretext"},rt={key:7,class:"col align-self-center text-bold scoretext"},it={class:"col align-self-center text-bold text-end ps-1 pe-1"},dt={key:0,class:"me-1"},ct={class:"text-nowrap"},mt={key:8,class:"col-1 icon"},ht=["src"],_t={key:9,class:"col-1 icon"};function ut(o,t,s,c,n,m){return a(),i("div",U,[n.header.vis_school_ID?(a(),i("div",z,[e("img",{class:"teamicon",src:s.page.cdn+"/img/images/logos/"+s.game_scroll_data.visitor+".gif/target.webp"},null,8,K)])):(a(),i("div",Y)),e("div",q,[s.game_scroll_data.vrnk?(a(),i("span",J,r(s.game_scroll_data.vrnk),1)):y("",!0),g(r(n.header.vis_name),1),t[0]||(t[0]=e("br",null,null,-1)),e("span",Q,r(s.game_scroll_data.vis_rec),1)]),n.game_data.lvscore>-1?(a(),i("div",Z,r(n.game_data.lvscore),1)):(a(),i("div",tt,r(n.game_data.vscore),1)),n.game_data.complete=="Y"?(a(),i("div",et,[t[3]||(t[3]=g("Final ",-1)),n.game_data.ots?(a(),i("span",st,[t[2]||(t[2]=g("OT",-1)),n.game_data.ots>1?(a(),i("span",ot,r(n.game_data.ots),1)):y("",!0),n.header.sho_notes?(a(),i("span",nt,[t[1]||(t[1]=e("br",null,null,-1)),g(r(n.header.sho_notes),1)])):y("",!0)])):y("",!0)])):(a(),i("div",at,r(n.game_data.pd_time)+" "+r(n.game_data.pd+n.game_data.pd_suffix),1)),n.game_data.lhscore>-1?(a(),i("div",lt,r(n.game_data.lhscore),1)):(a(),i("div",rt,r(n.game_data.hscore),1)),e("div",it,[s.game_scroll_data.hrnk?(a(),i("span",dt,r(s.game_scroll_data.hrnk),1)):y("",!0),g(r(n.header.home_name),1),t[4]||(t[4]=e("br",null,null,-1)),e("span",ct,r(s.game_scroll_data.home_rec),1)]),n.header.vis_school_ID?(a(),i("div",mt,[e("img",{class:"teamicon",src:s.page.cdn+"/img/images/logos/"+s.game_scroll_data.home+".gif/target.webp"},null,8,ht)])):(a(),i("div",_t))])}const pt=k(X,[["render",ut],["__scopeId","data-v-fa03d608"]]),gt={name:"PStats",components:{},props:{boxstats:{type:Array},title:{type:String},type:{type:String,Default:"bl"},gender:{type:String},teamId:{type:String},roster_map:{type:Object}},data(){return{tot:{g:0,a:0,pts:0,shotsNet:0,shots:0,plsmns:0,bl:0,foW:0,fo:0}}},watch:{},methods:{rowClass(o){return o[this.type]?"":"d-none"}},created(){},computed:{},mounted(){for(const[o,t]of Object.entries(this.boxstats))if(this.tot.g+=t.g,this.tot.a+=t.a,this.tot.pts+=t.pts,this.tot.shotsNet+=t.shotsNet,this.tot.shots+=t.shots,this.tot.plsmns+=t.plsmns,this.tot.bl+=t.bl,this.tot.foW+=t.foW,this.tot.fo+=t.fo,
1!t.hasOwnProperty("player_ID")){const s=this.teamId+"_"+o;this.roster_map.hasOwnProperty(s)&&(t.player_ID=this.roster_map[s].player_ID)}}},yt={class:"table table-sm table-striped text-nowrap text-stats"},ft={class:"text-end"},xt={key:0},bt=["href"],vt={key:1},kt={key:0,class:"text-end"},wt={key:0},Ot={key:1},Pt={key:1,class:"text-end"},It={class:"text-bold"},St={key:0,class:"text-end"},Tt={key:0},Ct={key:1},Ft={key:1,class:"text-end"};function Nt(o,t,s,c,n,m){return a(),i("table",yt,[e("thead",null,[t[0]||(t[0]=e("th",null,"Player",-1)),e("th",ft,r(s.title),1)]),e("tbody",null,[(a(!0),i(f,null,b(s.boxstats,(l,d)=>(a(),i("tr",{class:N(m.rowClass(l))},[e("td",null,[l.hasOwnProperty("player_ID")?(a(),i("span",xt,[e("a",{href:"/stats/player/"+s.gender+"id,"+l.player_ID+"/"+l.name.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(l.name),9,bt)])):(a(),i("span",vt,r(l.name)+"}",1))]),s.type=="fo"?(a(),i("td",kt,[l.fo>0?(a(),i("span",wt,r(l.foW)+"/"+r(l.fo)+" ("+r((100*l.foW/l.fo).toFixed(2))+"%)",1)):(a(),i("span",Ot,r(l.foW)+"/"+r(l.fo)+" (0.00%)",1))])):(a(),i("td",Pt,r(l[s.type]),1))],2))),256))]),e("tfoot",null,[e("tr",It,[t[1]||(t[1]=e("td",null,"Total",-1)),s.type=="fo"?(a(),i("td",St,[n.tot.fo>0?(a(),i("span",Tt,r(n.tot.foW)+"/"+r(n.tot.fo)+" ("+r((100*n.tot.foW/n.tot.fo).toFixed(2))+"%)",1)):(a(),i("span",Ct,r(n.tot.foW)+"/"+r(n.tot.fo)+" (0.00%)",1))])):(a(),i("td",Ft,r(n.tot[s.type]),1
1))])])])}const Et=k(gt,[["render",Nt]]),Dt={name:"Summary",components:{PStats:Et},props:{game:{type:Object},boxstats:{type:Object},gender:{type:String},roster_map:{type:Object}},data(){return{}},watch:{},methods:{},created(){},computed:{},mounted(){console.log("boxstats",this.boxstats),console.log("teamscore",this.game.teamscore);for(const[o,t]of Object.entries(this.game.teamscore))t.hasOwnProperty("player_ID")||this.roster_map.hasOwnProperty(t.gen_player_id)&&(t.player_ID=this.roster_map[t.gen_player_id].player_ID);console.log("summary teamscore",this.game.teamscore);for(const[o,t]of Object.entries(this.game.teampen))t.hasOwnProperty("player_ID")||(this.roster_map.hasOwnProperty(t.gen_player_id)&&(t.player_ID=this.roster_map[t.gen_player_id].player_ID),console.log(t));console.log("summary teampen",this.game.teampen)}},Gt={class:"mt-2 table-responsive"},Lt={class:"row"},jt={class:"col"},Ht={class:"table table-sm table-striped text-stats"},At={key:0},$t=["href"],Rt={key:1},Bt={class:"text-end"},Vt={class:"col"},Wt={class:"table table-sm table-striped text-stats"},Mt={key:0},Xt=["href"],Ut={key:1},zt={class:"text-end"},Kt={class:"row"},Yt={class:"col"},qt={class:"text-largest text-bold text-theme-secondary"},Jt={class:"col"},Qt={class:"text-largest text-bold text-theme-secondary"},Zt={class:"row"},te={class:"col"},ee={class:"text-largest text-bold text-theme-secondary"},se={class:"col"},oe={class:"text-largest text-bold text-theme-secondary"};function ne(o,t,s,c,n,m){const l=x("PStats");return a(),i("div",Gt,[e("div",Lt,[e("div",jt,[t[2]||(t[2]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Player Scoring Summary",-1)),e("table",Ht,[t[1]||(t[1]=e("thead",null,[e("th",null,"Team"),e("th"),e("th",null,"Player"),e("th",{class:"text-end"},"Scoring")],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.game.teamscore,(d,u)=>(a(),i("tr",null,[e("td",null,r(d.chs_team_code),1),t[0]||(t[0]=e("td",null,null,-1)),e("td",null,[d.hasOwnProperty("player_ID")?(a(),i("span",At,[e("a",{href:"/stats/player/"+s.gender+"id,"+d.player_ID+"/"+d.name.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(d.name),9,$t)])):(a(),i("span",Rt,r(d.name),1))]),e("td",Bt,r(d.g)+"-"+r(d.a)+"="+r(d.pts),1)]))),256))])])]),e("div",Vt,[t[4]||(t[4]=e("div",{class:"mt-2 mt-md-0 text-bold text-larger text-theme-secondary"},"Player Penalty Summary",-1)),e("table",Wt,[t[3]||(t[3]=e("thead",null,[e("th",null,"Team"),e("th",null,"Player"),e("th",{class:"text-end"},"Penalties")],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.game.teampen,(d,u)=>(a(),i("tr",null,[e("td",null,r(d.chs_team_code),1),e("td",null,[d.hasOwnProperty("player_ID")?(a(),i("span",Mt,[e("a",{href:"/stats/player/"+s.gender+"id,"+d.player_ID+"/"+d.name.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(d.name),9,Xt)])):(a(),i("span",Ut,r(d.name),1))]),e("td",zt,r(d.pen)+"-"+r(d.pims),1)]))),256))])])])]),t[5]||(t[5]=e("div",{class:"mt-2 text-bold text-larger text-theme-secondary"},"Faceoffs",-1)),e("div",Kt,[e("div",Yt,[e("div",qt,r(s.game.teams.teamInfo[s.game.teams.teamInfo.V].shortname),1),p(l,{boxstats:s.boxstats[s.game.teams.teamInfo.V],gender:s.gender,type:"fo",title:"Faceoffs",teamId:s.game.teams.teamInfo.V,roster_map:s.roster_map},null,8,["boxstats","gender","teamId","roster_map"])]),e("div",Jt,[e("div",Qt,r(s.game.teams.teamInfo[s.game.teams.teamInfo.H].shortname),1),p(l,{boxstats:s.boxstats[s.game.teams.teamInfo.H],gender:s.gender,type:"fo",title:"Faceoffs",teamId:s.game.teams.teamInfo.H,roster_map:s.roster_map},null,8,["boxstats","gender","teamId","roster_map"])])]),t[6]||(t[6]=e("div",{class:"mt-2 text-bold text-larger text-theme-secondary"},"Blocks",-1)),e("div",Zt,[e("div",te,[e("div",ee,r(s.game.teams.teamInfo[s.game.teams.teamInfo.V].shortname),1),p(l,{boxstats:s.boxstats[s.game.teams.teamInfo.V],gender:s.gender,type:"bl",title:"Blocks",teamId:s.game.teams.teamInfo.V,roster_map:s.roster_map},null,8,["boxstats","gender","teamId","roster_map"])]),e("div",se,[e("div",oe,r(s.game.teams.teamInfo[s.game.teams.teamInfo.H].shortname),1),p(l,{boxstats:s.boxstats[s.game.teams.teamInfo.H],gender:s.gender,type:"bl",title:"Blocks",teamId:s.game.teams.teamInfo.H,roster_map:s.roster_map},null,8,["boxstats","gender","teamId","roster_map"])])])])}const ae=k(Dt,[["render",ne]]),le={name:"BoxStats",components:{},props:{boxstats:{type:Object}},data(){return{tot:{g:0,a:0,pts:0,shotsNet:0,shots:0,plsmns:0,bl:0,foW:0,fo:0}}},watch:{},methods:{},created(){},computed:{},mounted(){for(const[o,t]of Object.entries(this.boxstats))this.tot.g+=t.g,this.tot.a+=t.a,this.tot.pts+=t.pts,this.tot.shotsNet+=t.shotsNet,this.tot.shots+=t.shots,this.tot.plsmns+=t.plsmns,this.tot.bl+=t.bl,this.tot.foW+=t.foW,this.tot.fo+=t.fo}},re={class:"table table-sm table-striped text-nowrap text-stats"},ie={class:"text-end"},de={class:"text-end"},ce={class:"text-end"},me={class:"text-end"},he={key:0,class:"text-end"},_e={key:1,class:"text-end"},ue={class:"text-end"},pe={class:"text-end"},ge={class:"text-end"},ye={class:"text-bold"},fe={class:"text-end"},xe={class:"text-end"},be={class:"text-end"},ve={class:"text-end"},ke={key:0,class:"text-end"},we={key:1,class:"text-end"},Oe={class:"text-end"},Pe={class:"text-end"},Ie={class:"text-end"};function Se(o,t,s,c,n,m){return a(),i("table",re,[t[1]||(t[1]=e("thead",null,[e("th",
1null,"Player"),e("th",{class:"text-end"},"G"),e("th",{class:"text-end"},"A"),e("th",{class:"text-end"},"PTS"),e("th",{class:"text-end"},"SH Net/SH Tot"),e("th",{class:"text-end"},"G%"),e("th",{class:"text-end"},"+/-"),e("th",{class:"text-end"},"Blocks"),e("th",{class:"text-end"},"FO W/FO Tot")],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.boxstats,(l,d)=>(a(),i("tr",null,[e("td",null,r(l.name),1),e("td",ie,r(l.g),1),e("td",de,r(l.a),1),e("td",ce,r(l.pts),1),e("td",me,r(l.shotsNet)+"/"+r(l.shots),1),l.shots>0?(a(),i("td",he,r((100*l.g/l.shots).toFixed(2))+"%",1)):(a(),i("td",_e,"0.00%")),e("td",ue,r(l.plsmns),1),e("td",pe,r(l.bl),1),e("td",ge,r(l.foW)+"/"+r(l.fo),1)]))),256))]),e("tfoot",null,[e("tr",ye,[t[0]||(t[0]=e("td",{class:"text-end"},"Total",-1)),e("td",fe,r(n.tot.g),1),e("td",xe,r(n.tot.a),1),e("td",be,r(n.tot.pts),1),e("td",ve,r(n.tot.shotsNet)+"/"+r(n.tot.shots),1),n.tot.shots>0?(a(),i("td",ke,r((100*n.tot.g/n.tot.shots).toFixed(2))+"%",1)):(a(),i("td",we,"0.00%")),e("td",Oe,r(n.tot.plsmns),1),e("td",Pe,r(n.tot.bl),1),e("td",Ie,r(n.tot.foW)+"/"+r(n.tot.fo),1)])])])}const Te=k(le,[["render",Se]]),Ce={name:"Stats",components:{BoxStats:Te},props:{game:{type:Object},boxstats:{type:Object}},data(){return{}},watch:{},methods:{},created(){},computed:{},mounted(){}},Fe={class:"mt-2 table-responsive"},Ne={class:"text-largest text-bold text-theme-secondary"},Ee={class:"text-largest text-bold text-theme-secondary"};function De(o,t,s,c,n,m){const l=x("BoxStats");return a(),i("div",Fe,[e("div",Ne,r(s.game.teams.teamInfo[s.game.teams.teamInfo.V].shortname),1),p(l,{boxstats:s.boxstats[s.game.teams.teamInfo.V]},null,8,["boxstats"]),e("div",Ee,r(s.game.teams.teamInfo[s.game.teams.teamInfo.H].shortname),1),p(l,{boxstats:s.boxstats[s.game.teams.teamInfo.H]},null,8,["boxstats"])])}const Ge=k(Ce,[["render",De]]),Le={name:"Lines",components:{},props:{lines:{type:Object},teams:{type:Object}},data(){return{}},watch:{},methods:{getClass(o){return!o.ld&&!o.rd&&!o.g?"d-none":""}},created(){},computed:{},mounted(){}},je={class:"mt-2"},He={class:"text-large text-bold text-theme-secondary"},Ae={class:"table table-striped","text-stats":""},$e={key:0},Re={key:1},Be={key:2},Ve={key:3},We={key:4},Me={key:5},Xe={key:0},Ue={key:1},ze={key:2},Ke={key:3},Ye={key:4},qe={key:5},Je={key:6},Qe={class:"text-large text-bold text-theme-secondary"},Ze={class:"table table-striped"},ts={key:0},es={key:1},ss={key:2},os={key:3},ns={key:4},as={key:5},ls={key:0},rs={key:1},is={key:2},ds={key:3},cs={key:4},ms={key:5},hs={key:6};function _s(o,t,s,c,n,m){return a(),i("div",je,[e("div",null,[e("div",He,r(s.teams.teamInfo[s.teams.teamInfo.V].shortname),1),e("table",Ae,[t[0]||(t[0]=e("thead",{class:"thead-theme-primary"},[e("tr",null,[e("th",null,"Line Num"),e("th",null,"Player 1"),e("th",null,"Player 2"),e("th",null,"Player 3")])],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.lines.V,l=>(a(),i("tr",null,[e("td",null,"F"+r(l.number),1),l.lw?(a(),i("td",$e,"LW: "+r(l.lw),1)):(a(),i("td",Re)),l.c?(a(),i("td",Be,"C: "+r(l.c),1)):(a(),i("td",Ve)),l.rw?(a(),i("td",We,"RW: "+r(l.rw),1)):(a(),i("td",Me))]))),256)),(a(!0),i(f,null,b(s.lines.V,l=>(a(),i("tr",{class:N(m.getClass(l))},[e("td",null,"D"+r(l.number),1),l.ld?(a(),i("td",Xe,"LD: "+r(l.ld),1)):(a(),i("td",Ue)),l.rd?(a(),i("td",ze,"GD: "+r(l.rd),1)):(a(),i("td",Ke)),l.g?(a(),i("td",Ye,"G: "+r(l.g),1)):l.XS?(a(),i("td",qe,r(l.XS.pos)+": "+r(l.XS.name),1)):(a(),i("td",Je))],2))),256))])]),t[2]||(t[2]=e("hr",null,null,-1)),e("div",Qe,r(s.teams.teamInfo[s.teams.teamInfo.H].shortname),1),e("table",Ze,[t[1]||(t[1]=e("thead",{class:"thead-theme-primary"},[e("tr",null,[e("th",null,"Line Num"),e("th",null,"Player 1"),e("th",null,"Player 2"),e("th",null,"Player 3")])],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.lines.H,l=>(a(),i("tr",null,[e("td",null,"F"+r(l.number),1),l.lw?(a(),i("td",ts,"LW: "+r(l.lw),1)):(a(),i("td",es)),l.c?(a(),i("td",ss,"C: "+r(l.c),1)):(a(),i("td",os)),l.rw?(a(),i("td",ns,"RW: "+r(l.rw),1)):(a(),i("td",as))]))),256)),(a(!0),i(f,null,b(s.lines.H,l=>(a(),i("tr",{class:N(m.getClass(l))},[e("td",null,"D"+r(l.number),1),l.ld?(a(),i("td",ls,"LD: "+r(l.ld),1)):(a(),i("td",rs)),l.rd?(a(),i("td",is,"GD: "+r(l.rd),1)):(a(),i("td",ds)),l.g?(a(),i("td",cs,"G: "+r(l.g),1)):l.XS?(a(),i("td",ms,r(l.XS.pos)+": "+r(l.XS.name),1)):(a(),i("td",hs))],2))),256))])])])])}const us=k(Le,[["render",_s]]),ps={name:"ShotTooltip",props:{play:{type:Object,default:null},left:{type:Number,default:0},top:{type:Number,default:0},visible:{type:Boolean,default:!1},per:{type:Number,default:0}},computed:{tooltipStyle(){return{position:"absolute",left:`${this.left}px`,top:`${this.top}px`,background:"white",border:"1px solid #333",padding:"8px",borderRadius:"4px",boxShadow:"0 2px 6px rgba(0,0,0,0.2)",zIndex:50,minWidth:"160px"}},playerName(){if(!this.play)return"Shot";const o=this.play;if((o.text||o.textDescription||o.rawText||"").toString().toUpperCase().includes("EXTRA SKATERS"))return"Shot";if(o.__playerName&&typeof o.__playerName=="string"&&o.__playerName.trim())return o.__playerName.trim();const s=o.firstName??o.first_name??"",c=o.familyName??o.family_name??"",n=`${s}`.trim()&&`${c}`.trim()?`${s} ${c}`.trim():"";if(n)return n;const m=(o.text||"").toString();try{const l=m.match(/\bby\s+([\p{L}\p{M}.'\-\s]+?)(?=\s+(?:ON|OFF|BLOCKED|ONTARGET|OFFTARGET|ONPIPE|GOAL|SHOT|WITH|TO|FOR|$))/iu);if(l&&l[1])return l[1].trim()}catch{const d=m.split(/\bby\b/i);if(d.length>1){let u=d[1].trim();if(u=u.split(/\b(?:ON|OFF|BLOCKED|ONTARGET|OFFTARGET|ONPIPE|GOAL|SHOT|WITH|TO|FOR)\b/i)[0].trim(),u)return u}}return o.player&&typeof o.player=="string"&&o.player.trim()?o.player.trim():"Shot"},teamName(){return this.play?this.play.teamName??this.play.team??this.play.team_name??this.play.team_code??"":""},timeLabel(){if(!this.play)return"";const o=this.play,t=o.period??null;let s=o.clock??o.time??o.timeActual??null;!s&&o.clock_display&&(s=o.clock_display),!s&&o.clockTime&&(s=o.clockTime);let c="";if(s){c=String(s),c.includes(" ")&&(c=c.split(" ")[1]??c.split(" ")[0]);const n=c.split(":");n.length>=2&&(c=`${n[0].padStart(2,"0")}:${n[1].padStart(2,"0")}`)}return t&&c?`Period ${t} â ${c}
1`:t?`Period ${t}`:c},displayResult(){if(!this.play)return"";const o=this.play;if((o.text||o.textDescription||o.rawText||"").toString().toUpperCase().includes("EXTRA SKATERS"))return"Shot";if(o.__dotColor){const l=String(o.__dotColor).toUpperCase();if(l==="#00FF00")return"Goal";if(l==="#0000FF")return"On Target";if(l==="#FFFF00")return"On Pipe";if(l==="#FFA500")return"Blocked";if(l==="#AEAEAE")return"Off Target";if(l==="#FF6EC7")return"Faceoff"}const s=o.__derived_actionType??null;if(s){const l={goal:"Goal",shot:"Shot",ontarget:"On Target",onpipe:"On Pipe",offtarget:"Off Target",block:"Blocked",faceoff:"Faceoff"},d=String(s).toLowerCase();if(l[d])return l[d];if(d.includes("goal"))return"Goal";if(d.includes("ontarget")||d.includes("on")&&d.includes("target"))return"On Target";if(d.includes("pipe"))return"On Pipe";if(d.includes("off")&&d.includes("target"))return"Off Target"}const c=(o.text||"").toString().toUpperCase(),n=(o.subType||o.sub_type||"").toString().toLowerCase();return(o.actionType||o.action_type||"").toString().toLowerCase()==="goal"||n==="goal"||/\bGOAL\b/.test(c)?"Goal":n==="ontarget"||/ONTARGET/.test(c)?"On Target":n==="onpipe"||/ONPIPE/.test(c)?"On Pipe":n==="offtarget"||/OFFTARGET/.test(c)?"Off Target":n==="block"||/BLOCKED/.test(c)?"Blocked":c.includes("SHOT")?"Shot":""}}},gs={class:"title"},ys={key:0},fs={key:1},xs={key:2},bs={class:"actions"};function vs(o,t,s,c,n,m){return s.visible&&s.play?(a(),i("div",{key:0,class:"shot-tooltip",style:B(m.tooltipStyle),onClick:t[1]||(t[1]=R(()=>{},["stop"])),role:"dialog","aria-modal":"false"},[e("div",gs,r(m.playerName),1),m.teamName?(a(),i("div",ys,"Team: "+r(m.teamName),1)):y("",!0),m.timeLabel?(a(),i("div",fs,r(m.timeLabel),1)):y("",!0),m.displayResult?(a(),i("div",xs,"Result: "+r(m.displayResult),1)):y("",!0),e("div",bs,[e("button",{class:"close-btn",onClick:t[0]||(t[0]=l=>o.$emit("close"))},"Close")])],4)):y("",!0)}const ks=k(ps,[["render",vs],["__scopeId","data-v-0042d292"]]),ws={name:"ShotChart",components:{ShotTooltip:ks},props:{plays:{type:Array},per:{type:Number},teams:{type:Object},complete:{type:String,default:"N"},per_complete:{type:Boolean,default:!1}},data(){return{imageSizes:{Web:{width:800,height:340},Tablet:{width:585,height:249},Mobile:{width:410,height:175}},screenSize:"Web",width:800,height:340,actionColor:{goal:{radius:7,color:"#00FF00"},shot:{radius:5,color:"#0000FF"},block:{radius:5,color:"#FFA500"},pipe:{radius:7,color:"#FFFF00"},faceoff:{radius:12,color:"#FF6EC7"},offtarget:{radius:5,color:"#AEAEAE"}},teamCode:["H","V"],faceoffLocation:{spot0:{x:50/100,y:50/100},spot1:{x:11.6/100,y:75.75/100},spot2:{x:38.9/100,y:75.75/100},spot3:{x:61.1/100,y:75.75/100},spot4:{x:88.4/100,y:75.75/100},spot5:{x:11.6/100,y:24.25/100},spot6:{x:38.9/100,y:24.25/100},spot7:{x:61.1/100,y:24.25/100},spot8:{x:88.4/100,y:24.25/100}},vueCanvas:null,rinkImage:null,shotPoints:[],selectedPointIndex:-1,tooltip:{visible:!1,left:0,top:0,play:null}}},methods:{setDims(){this.width=this.imageSizes[this.screenSize].width,this.height=this.imageSizes[this.screenSize].height},addFaceoff(o,t){this.addCircle(o,this.faceoffLocation[t].x,this.faceoffLocation[t].y,this.actionColor.faceoff.radius,this.actionColor.faceoff.color,"#333333")},addCircle(o,t,s,c,n,m){const l=t*o.canvas.width,d=(1-s)*o.canvas.height;o.beginPath(),o.arc(l,d,c,0,2*Math.PI,!1),o.fillStyle=n,o.fill(),o.lineWidth=2,o.strokeStyle=m,o.stroke()},addText(o,t,s,c,n,m){const l=t*o.canvas.width,d=(1-s)*o.canvas.height,u=o.measureText(n).width;o.fillStyle="#000000",o.translate(l,d),o.rotate(c),o.fillText(n,-u/2,4),o.rotate(-c),o.translate(-l,-d)},add_to_chart(o,t){var s=o.actionType,c=this.actionColor.faceoff.radius;if((o.text||"").toString().toUpperCase(),o.text&&o.text.includes(" BLOCKED")?s="block":o.text&&o.text.includes(" ONPIPE")?s="pipe":o.text&&o.text.includes(" OFFTARGET")&&(s="offtarget"),console.log(o.actionType),t!=1&&(c=this.actionColor[s].radius),o.x===void 0||o.y===void 0)return;try{if(o&&typeof o=="object"){const d=o.firstName??o.first_name??"",u=o.familyName??o.family_name??"";let h=d&&u?`${d} ${u}`.trim():"";if(!h&&o.player&&typeof o.player=="string"&&o.player.trim()&&(h=o.player.trim()),!h){const _=(o.text||"").toString();try{const v=_.match(/\bby\s+([\p{L}\p{M}.'\-\s]+?)(?=\s+(?:ON|OFF|BLOCKED|ONTARGET|OFFTARGET|ONPIPE|GOAL|SHOT|WITH|TO|FOR|$))/iu);v&&v[1]&&(h=v[1].trim())}catch{const O=_.split(/\bby\b/i);if(O.length>1){let w=O[1].trim();w=w.split(/\b(?:ON|OFF|BLOCKED|ONTARGET|OFFTARGET|ONPIPE|GOAL|SHOT|WITH|TO|FOR)\b/i)[0].trim(),w&&(h=w)}}}o.__playerName=h||"",o.__derived_actionType=s}}catch{}const n=this.actionColor[s]&&this.actionColor[s].color||"#000";try{o&&typeof o=="object"&&(o.__dotColor=n)}catch{}this.addCircle(this.vueCanvas,o.x/100,o.y/100,c,n,"#333333");
1const m=o.x/100*this.vueCanvas.canvas.width,l=(1-o.y/100)*this.vueCanvas.canvas.height;if(s==="goal"){const u=this.actionColor.shot&&this.actionColor.shot.color||null;let h=null;this.shotPoints=this.shotPoints.filter(_=>{const v=_.cx-m,O=_.cy-l,w=Math.sqrt(v*v+O*O),I=(_.play&&(_.play.__derived_actionType||_.play.actionType||"")).toString().toLowerCase(),C=_.play&&_.play.__dotColor&&u&&_.play.__dotColor===u;return w<=8&&(I==="shot"||C)?(h=_.play,!1):!0});try{h&&o&&typeof o=="object"&&((!o.__playerName||!o.__playerName.trim())&&h.__playerName?o.__playerName=h.__playerName:(!o.__playerName||!o.__playerName.trim())&&h.player&&(o.__playerName=h.player),(!o.teamName||!String(o.teamName).trim())&&(h.teamName||h.team)&&(o.teamName=h.teamName||h.team))}catch(_){console.log("Error: ",_)}}this.shotPoints.push({cx:m,cy:l,radius:c,play:o})},setSide(){var o=0,t=0,s=0,c=this.teamSide(this.per%2).left,n=this.teamSide(this.per%2).right;for(const[m,l]of Object.entries(this.plays))o==0&&l.actionType=="shot"&&l.x>0&&l.x<25&&l.hasOwnProperty("team_loc_code")?(c==l.team_loc_code&&(t++,t>1&&(this.teamCode=["V","H"])),s++):o==0&&l.actionType=="shot"&&l.x>75&&l.x<100&&l.hasOwnProperty("team_loc_code")&&(n==l.team_loc_code&&(t++,t>1&&(this.teamCode=["V","H"])),s++),s>1&&(o=1)},teamSide(o){var t={0:{left:this.teamCode[0],right:this.teamCode[1]},1:{left:this.teamCode[1],right:this.teamCode[0]}};return t[o]},onCanvasClick(o){if(!this.vueCanvas)return;const s=this.$refs.canvas.getBoundingClientRect(),c=this.vueCanvas.canvas.width/s.width,n=this.vueCanvas.canvas.height/s.height,m=(o.clientX-s.left)*c,l=(o.clientY-s.top)*n;let d=-1,u=1/0;for(let h=0;h<this.shotPoints.length;h++){const _=this.shotPoints[h],v=m-_.cx,O=l-_.cy,w=Math.sqrt(v*v+O*O);w<=_.radius+4&&w<u&&(u=w,d=h)}if(d!==-1){this.selectedPointIndex=d;const h=this.shotPoints[d],_=this.$refs.container.getBoundingClientRect(),v=s.left-_.left,O=s.top-_.top,w=h.cx/this.vueCanvas.canvas.width*s.width,I=h.cy/this.vueCanvas.canvas.height*s.height;let C=v+w,F=O+I-10-60;C=Math.min(Math.max(6,C),_.width-180),F=Math.min(Math.max(6,F),_.height-40),this.tooltip={visible:!0,left:C,top:F,play:h.play},this.redrawCanvas()}else this.closeTooltip()},onCanvasMove(o){if(!this.vueCanvas)return;const s=this.$refs.canvas.getBoundingClientRect(),c=this.vueCanvas.canvas.width/s.width,n=this.vueCanvas.canvas.height/s.height,m=(o.clientX-s.left)*c,l=(o.clientY-s.top)*n;let d=!1;for(const u of this.shotPoints){const h=m-u.cx,_=l-u.cy;if(Math.sqrt(h*h+_*_)<=u.radius+4){d=!0;break}}this.$refs.canvas.style.cursor=d?"pointer":"default"},closeTooltip(){this.tooltip.visible=!1,this.tooltip.play=null,this.selectedPointIndex=-1,this.redrawCanvas()},redrawCanvas(){if(!this.vueCanvas||!this.rinkImage)return;const o=this.vueCanvas;o.clearRect(0,0,o.canvas.width,o.canvas.height),o.drawImage(this.rinkImage,0,0,this.width,this.height,0,0,this.width,this.height);const t=this.teamSide(this.per%2).left,s=this.teamSide(this.per%2).right;try{this.addText(o,3/100,50/100,Math.PI/2,this.teams.teamInfo[this.teams.teamInfo[t]].shortname),this.addText(o,97/100,50/100,-Math.PI/2,this.teams.teamInfo[this.teams.teamInfo[s]].shortname)}catch{}for(let n=0;n<this.shotPoints.length;n++){const m=this.shotPoints[n],l=m.cx/o.canvas.width,d=1-m.cy/o.canvas.height;this.addCircle(o,l,d,m.radius,this._colorForPlay(m.play),"#333333"),n===this.selectedPointIndex&&(o.beginPath(),o.arc(m.cx,m.cy,m.radius+4,0,2*Math.PI,!1),o.lineWidth=2,o.strokeStyle="#FF0000",o.stroke())}const c=this.plays&&this.plays[0];c&&c.actionType=="faceoff"&&c.area&&this.addFaceoff(o,c.area)},_colorForPlay(o){var t=o.actionType;return o.text&&o.text.includes(" BLOCKED")?t="block":o.text&&o.text.includes(" ONPIPE")?t="pipe":o.text&&o.text.includes(" OFFTARGET")&&(t="offtarget"),(this.actionColor[t]||{}).color||"#000"}},mounted(){window.screen.width<=650?this.screenSize="Mobile":window.screen.width<=780&&(this.screenSize="Tablet"),this.setDims(),this.setSide(),this.shotPoints=[];const o=this.$refs.canvas,t=o.getContext("2d");this.vueCanvas=t;const s=this,c=new Image(this.width,this.height);c.src="/images/HockeyRink-"+this.screenSize+".png",this.rinkImage=c,c.onload=function(n){t.drawImage(c,0,0,s.width,s.height,0,0,s.width,s.height);var m=s.teamSide(s.per%2).left,l=s.teamSide(s.per%2).right;try{s.addText(s.vueCanvas,3/100,50/100,Math.PI/2,s.teams.teamInfo[s.teams.teamInfo[m]].shortname),s.addText(s.vueCanvas,97/100,50/100,-Math.PI/2,s.teams.teamInfo[s.teams.teamInfo[l]].shortname)}
1catch(h){console.log("Error adding team names: ",h)}var d=1;(s.complete=="Y"||s.per_complete)&&(d=0),s.shotPoints=[];for(const[h,_]of Object.entries(s.plays||[]))_.actionType=="faceoff"&&d==1&&(d=0),_.x>0&&s.actionColor.hasOwnProperty(_.actionType)&&(s.add_to_chart(_,d),d=0);const u=s.plays&&s.plays[0];u&&u.actionType=="faceoff"&&u.area&&s.addFaceoff(s.vueCanvas,u.area)},o.addEventListener("click",this.onCanvasClick),o.addEventListener("mousemove",this.onCanvasMove),document.addEventListener("click",n=>{if(!this.tooltip.visible)return;this.$refs.container.contains(n.target)||this.closeTooltip()})},beforeUnmount(){const o=this.$refs.canvas;o&&(o.removeEventListener("click",this.onCanvasClick),o.removeEventListener("mousemove",this.onCanvasMove))}},Os={class:"mt-2 text-center",ref:"container",style:{position:"relative"}},Ps={class:"text-bold text-larger text-theme-secondary"},Is=["id","width","height"];function Ss(o,t,s,c,n,m){const l=x("ShotTooltip");return a(),i("div",Os,[e("div",Ps,"Shot Chart for Period "+r(s.per),1),e("canvas",{ref:"canvas",id:"c"+s.per,class:"responsive-canvas",width:n.width,height:n.height,style:{display:"block"}},"The browser doesn't support the canvas element",8,Is),p(l,{play:n.tooltip.play,left:n.tooltip.left,top:n.tooltip.top,visible:n.tooltip.visible,per:s.per,onClose:m.closeTooltip},null,8,["play","left","top","visible","per","onClose"])],512)}const Ts=k(ws,[["render",Ss],["__scopeId","data-v-ca7c17af"]]),Cs={name:"Plays",components:{ShotChart:Ts},props:{game:{type:Object},page:{type:Object}},data(){return{plays:{},periods:{},tabIndex:0,ready:0}},watch:{},methods:{reversedPlays(o){const t=Object.keys(this.plays[o]);t.reverse();const s=[];for(const c of t)s.push(this.plays[o][c]);return s},add_play(o,t){o.period>0&&(this.periods.hasOwnProperty(o.period)||(this.periods[o.period]=o.period,this.plays[o.period]={},o.period>this.tabIndex&&(this.tabIndex=o.period)),this.plays[o.period][o.number]=o)}},created(){},computed:{},mounted(){for(const[o,t]of Object.entries(this.game.plays))if(t)for(const[s,c]of Object.entries(t))this.add_play(c,0);this.ready=1}},Fs={key:0,class:"mt-2"},Ns={class:"row text-bold"},Es={class:"col-4 col-md-3"},Ds=["src"],Gs={class:"col-4 col-md-3"},Ls=["src"],js={class:"col-4 col-md-3"},Hs=["src"],As={class:"col-4 col-md-3"},$s=["src"],Rs={class:"col-6 col-md-3"},Bs=["src"],Vs={class:"col-4 col-md-3"},Ws=["src"],Ms={class:"table table-striped text-stats"},Xs={class:""},Us={class:"text-bold text-uppercase"},zs={class:"text-bold"};function Ks(o,t,s,c,n,m){const l=x("ShotChart"),d=E,u=D;return n.ready?(a(),i("div",Fs,[p(u,{modelValue:n.tabIndex,"onUpdate:modelValue":t[0]||(t[0]=h=>n.tabIndex=h),"content-class":"mt-3"},{default:T(()=>[(a(!0),i(f,null,b(n.periods,h=>(a(),P(d,{title:h,id:h},{default:T(()=>[n.tabIndex==h?(a(),P(l,{plays:m.reversedPlays(h),per:h,teams:s.game.teams,key:m.reversedPlays(h).length,complete:s.game.game_info.complete,per_complete:h!=s.game.game_info.pd},null,8,["plays","per","teams","complete","per_complete"])):y("",!0),t[14]||(t[14]=e("br",null,null,-1)),e("div",Ns,[e("div",Es,[t[1]||(t[1]=e("span",null,"GOAL",-1)),t[2]||(t[2]=g()),e("img",{src:s.page.cdn+"/img/images/goal.png/target.webp",width:"30",height:"30"},null,8,Ds)]),e("div",Gs,[t[3]||(t[3]=e("span",null,"SHOT",-1)),t[4]||(t[4]=g()),e("img",{src:s.page.cdn+"/img/images/shot.png/target.webp",width:"30",height:"30"},null,8,Ls)]),e("div",js,[t[5]||(t[5]=e("span",null,"BLOCK",-1)),t[6]||(t[6]=g()),e("img",{src:s.page.cdn+"/img/images/block.png/target.webp",width:"30",height:"30"},null,8,Hs)]),e("div",As,[t[7]||(t[7]=e("span",null,"PIPE",-1)),t[8]||(t[8]=g()),e("img",{src:s.page.cdn+"/img/images/pipe.png/target.webp",width:"30",height:"30"},null,8,$s)]),e("div",Rs,[t[9]||(t[9]=e("span",{class:"text-nowrap"},"OFFTARGET SHOT",-1)),t[10]||(t[10]=g()),e("img",{src:s.page.cdn+"/img/images/offtarget.png/target.webp",width:"30",height:"30"},null,8,Bs)]),e("div",Vs,[t[11]||(t[11]=e("span",null,"FACEOFF",-1)),t[12]||(t[12]=g()),e("img",{src:s.page.cdn+"/img/images/faceoff.png/target.webp",width:"30",height:"30"},null,8,Ws)])]),e("table",Ms,[t[13]||(t[13]=e("thead",{class:"thead-theme-primary"},[e("tr",{class:"text-large"}
1,[e("th",null,"Num"),e("th",null,"Type"),e("th",null,"Play")])],-1)),e("tbody",null,[(a(!0),i(f,null,b(m.reversedPlays(h),_=>(a(),i("tr",null,[e("td",Xs,r(_.number),1),e("td",Us,r(_.actionType),1),e("td",zs,r(_.text),1)]))),256))])])]),_:2},1032,["title","id"]))),256))]),_:1},8,["modelValue"])])):y("",!0)}const Ys=k(Cs,[["render",Ks]]),qs={name:"PerPeriod",components:{},props:{summary:{type:Object},periods:{type:Object},type:{type:String,default:"scoring"}},data(){return{map:{scoring:{title:"Scoring",key:"goals",tkey:"tgoals"},shots:{title:"Shots",key:"shots",tkey:"tshots"}}}},watch:{},methods:{},created(){},computed:{},mounted(){}},Js={class:"table table-sm table-striped text-stats"},Qs={class:"text-theme-secondary"},Zs={class:"text-end"},to={class:"text-bold"},eo={class:"text-end pe-0"},so={class:"text-end text-bold"};function oo(o,t,s,c,n,m){return a(),i("table",Js,[e("thead",null,[e("th",Qs,r(n.map[s.type].title),1),(a(!0),i(f,null,b(s.periods,(l,d)=>(a(),i("th",Zs,r(l),1))),256)),t[0]||(t[0]=e("th",{class:"text-end"},"Total",-1))]),e("tbody",null,[(a(!0),i(f,null,b(s.summary,(l,d)=>(a(),i("tr",null,[e("td",to,r(l.chs_team_code),1),(a(!0),i(f,null,b(s.periods,(u,h)=>(a(),i("td",eo,r(l[n.map[s.type].key][u]),1))),256)),e("td",so,"= "+r(l[n.map[s.type].tkey]),1)]))),256))])])}const no=k(qs,[["render",oo]]),ao={name:"Totals",components:{},props:{summary:{type:Object}},data(){return{tfo:0}},watch:{},methods:{},created(){},computed:{},mounted(){for(const[o,t]of Object.entries(this.summary))this.tfo+=t.tfoW}},lo={class:"table table-sm table-striped text-stats"},ro={class:"text-bold"},io={class:"text-end"},co={class:"text-end"},mo={class:"text-end"},ho={key:0,class:"text-end"},_o={key:1,class:"text-end"};function uo(o,t,s,c,n,m){return a(),i("table",lo,[t[0]||(t[0]=e("thead",null,[e("th"),e("th",{class:"text-end text-theme-secondary"},"Penalties"),e("th",{class:"text-end text-theme-secondary"},"Power Plays"),e("th",{class:"text-end text-theme-secondary"},"Blocks"),e("th",{class:"text-end text-theme-secondary"},"Faceoff (%)")],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.summary,(l,d)=>(a(),i("tr",null,[e("td",ro,r(l.chs_team_code),1),e("td",io,r(l.tpen)+"-"+r(l.tpim),1),e("td",co,r(l.tppg)+"-"+r(l.tppo),1),e("td",mo,r(l.tbl),1),n.tfo>0?(a(),i("td",ho,r(l.tfoW)+" ("+r((100*l.tfoW/n.tfo).toFixed(2))+"%)",1)):(a(),i("td",_o,r(l.tfoW)+" (0.00%)",1))]))),256))])])}const po=k(ao,[["render",uo]]),go={name:"Goals",components:{Headshot:G},props:{goals:{type:Array},gender:{type:String},page:{type:Object},roster_map:{type:Object}},data(){},watch:{},methods:{},created(){},computed:{},mounted(){}},yo={class:"table table-sm table-striped text-nowrap text-stats"},fo={class:"text-bold"},xo=["href"],bo={key:1},vo={key:2},ko={key:0},wo=["href"],Oo={key:1},Po={key:2},Io={key:0},So=["href"],To={key:1},Co={key:3},Fo={class:"text-bold text-wrap"};function No(o,t,s,c,n,m){const l=x("Headshot");return a(),i("table",yo,[t[5]||(t[5]=e("thead",null,[e("th",null,"Per"),e("th",null,"Goal"),e("th"),e("th",null,"Summary"),e("th",null,"Time")],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.goals,(d,u)=>(a(),i("tr",null,[e("td",null,r(d.period),1),e("td",fo,r(d.goalcode),1),e("td",null,[p(l,{player_name:d.scorer,player_ID:d.player_ID,player_headshot_url:d.headshot_url,gender:s.gender,page:s.page},null,8,["player_name","player_ID","player_headshot_url","gender","page"])]),e("td",null,[t[3]||(t[3]=g("G: ",-1)),d.player_ID>0?(a(),i("a",{key:0,href:"/stats/player/"+s.gender+"id,"+d.player_ID+"/"+d.scorer.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(d.scorer),9,xo)):(a(),i("span",bo,r(d.scorer),1)),t[4]||(t[4]=e("br",null,null,-1)),d.assist1?(a(),i("span",vo,[t[2]||(t[2]=g("A1: ",-1)),s.roster_map.hasOwnProperty(d.gen_assist1_id)?(a(),i("span",ko,[e("a",{href:"/stats/player/"+s.gender+"id,"+s.roster_map[d.gen_assist1_id].player_ID+"/"+d.assist1.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(d.assist1),9,wo)])):(a(),i("span",Oo,r(d.assist1),1)),d.assist2?(a(),i("span",Po,[t[0]||(t[0]=e("br",null,null,-1)),t[1]||(t[1]=g("A2: ",-1)),s.roster_map.hasOwnProperty(d.gen_assist2_id)?(a(),i("span",Io,[e("a",{href:"/stats/player/"+s.gender+"id,"+s.roster_map[d.gen_assist2_id].player_ID+"/"+d.assist2.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(d.assist2),9,So)])):(a(),i("span",To,r(d.assist2),1))])):y("",!0)])):(a(),i("span",Co,"Unassisted"))]),e("td",Fo,r(d.time)+" "+r(d.gtag),1)]))),256))])])}const Eo=k(go,[["render",No]]),Do={name:"Penalties",components:{},props:{penalties:{type:Array},roster_map:{type:Object},gender:{type:String}},data(){return{}},watch:{},methods:{},created(){},computed:{},mounted(){}},Go={class:"table table-sm table-striped text-nowrap text-stats"},Lo={class:"text-bold"},jo={key:0},Ho=["href"],Ao={key:1},$o={class:"text-bold"};function Ro(o,t,s,c,n,m){return a(),i("table",Go,[t[1]||(t[1]=e("thead",null,[e("th",
1null,"Per"),e("th",null,"Team"),e("th",null,"Player/Infraction"),e("th",null,"Time")],-1)),e("tbody",null,[(a(!0),i(f,null,b(s.penalties,(l,d)=>(a(),i("tr",null,[e("td",null,r(l.period),1),e("td",Lo,r(l.pencode),1),e("td",null,[s.roster_map.hasOwnProperty(l.gen_player_id)?(a(),i("span",jo,[e("a",{href:"/stats/player/"+s.gender+"id,"+s.roster_map[l.gen_player_id].player_ID+"/"+l.name.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(l.name),9,Ho)])):(a(),i("span",Ao,r(l.name),1)),t[0]||(t[0]=e("br",null,null,-1)),g(r(l.infraction)+" "+r(l.pims),1)]),e("td",$o,r(l.time),1)]))),256))])])}const Bo=k(Do,[["render",Ro]]),Vo={name:"Goals",components:{Headshot:G},props:{goalies:{type:Array},periods:{type:Object},gender:{type:String},page:{type:Object}},data(){return{imgSize:"60x90"}},watch:{},methods:{},created(){},computed:{},mounted(){}},Wo={class:"table table-sm table-striped text-nowrap text-stats"},Mo=["colspan"],Xo={class:"text-end"},Uo={class:"text-bold"},zo=["href"],Ko={key:1},Yo={key:2},qo={class:"text-end"},Jo={class:"text-bold text-end"},Qo={class:"text-bold text-end"};function Zo(o,t,s,c,n,m){const l=x("Headshot");return a(),i("table",Wo,[e("thead",null,[t[0]||(t[0]=e("th",null,null,-1)),t[1]||(t[1]=e("th",null,null,-1)),t[2]||(t[2]=e("th",null,null,-1)),e("th",{class:"text-center",colspan:Object.keys(s.periods).length},"Saves",8,Mo),t[3]||(t[3]=e("th",null,null,-1)),t[4]||(t[4]=e("th",null,null,-1))]),e("thead",null,[t[5]||(t[5]=e("th",null,"Team",-1)),t[6]||(t[6]=e("th",null,null,-1)),t[7]||(t[7]=e("th",null,"Goalie",-1)),(a(!0),i(f,null,b(s.periods,(d,u)=>(a(),i("th",Xo,r(d),1))),256)),t[8]||(t[8]=e("th",{class:"text-end"},"Total",-1)),t[9]||(t[9]=e("th",{class:"text-end"},"GA",-1))]),e("tbody",null,[(a(!0),i(f,null,b(s.goalies,(d,u)=>(a(),i("tr",null,[e("td",null,r(d.goaliecode),1),e("td",null,[p(l,{player_name:d.name,player_ID:d.player_ID,player_headshot_url:d.headshot_url,gender:s.gender,page:s.page},null,8,["player_name","player_ID","player_headshot_url","gender","page"])]),e("td",Uo,[d.player_ID>0?(a(),i("a",{key:0,href:"/stats/player/"+s.gender+"id,"+d.player_ID+"/"+d.name.replace(" ","-"),class:"text-theme-secondary text-decoration-none"},r(d.name),9,zo)):(a(),i("span",Ko,r(d.name),1)),t[10]||(t[10]=e("br",null,null,-1)),g("("+r(d.time)+" "+r(d.decision),1),d.sho?(a(),i("span",Yo," SHO")):y("",!0),t[11]||(t[11]=g(")",-1))]),(a(!0),i(f,null,b(s.periods,(h,_)=>(a(),i("td",qo,r(d[h]),1))),256)),e("td",Jo,"= "+r(d.tsaves),1),e("td",Qo,"("+r(d.tga)+" GA)",1)]))),256))])])}const tn=k(Vo,[["render",Zo],["__scopeId","data-v-5e7ecdcf"]]),en={layout:[$],components:{Head:pt,Summary:ae,Stats:Ge,Lines:us,Plays:Ys,PerPeriod:no,Totals:po,Goals:Eo,Penalties:Bo,Goalies:tn,PageHead:V,PostContent:M,InsticatorComments:W},props:{content:{type:Object},page:{type:Object},post:{type:Object}},data(){return{game_scroll_data:this.content.game_scroll_data,tabView:"",tabIndex:0,tabMap:{"":"0",Stats:"1",Lines:"2",Plays:"3",GameStory:"4",0:"summary",1:"stats",2:"lines",3:"plays",4:"gamestory"},ready:0,game:null,new_play:{},boxstats:{},boxstatsrefresh:1,summaryrefresh:1,livebox:null,sidebar:!0,game_update:this.content.game_scroll_data,roster_map:{},lines:{H:[],V:[]}}},watch:{},methods:{changeTab(o){this.tabView=o;var t="";this.tabView!=""&&(t="/"+this.tabView),window.history.pushState({},"",this.content.params.base_url+t)},toggleSidebar(){this.sidebar=!this.sidebar;const o=document.getElementById("sidebar-container"),t=document.getElementById("mainbox-container");this.sidebar?(o.className="d-none d-md-block col-md-4 border-end border-1 table-responsive",t.className="col-12 col-md-8"):(o.className="d-none col-md-4 border-end border-1 table-responsive",t.className="col-12")}},created(){},computed:{},mounted(){if(console.log("post",this.post),this.tabView=this.content.params.tab_view,this.tabIndex=this.tabMap[this.tabView],console.log("game ",this.content),this.ready=1,this.content.game&&(this.content.game.hasOwnProperty("livebox")&&(this.livebox=this.content.game.livebox),this.content.game.hasOwnProperty("game_info")?(this.game=this.content.game,this.boxstats=this.content.game.boxstats):this.content.game.hasOwnProperty("livebox")?(this.game=this.content.game.livebox,this.content.game.hasOwnProperty("livebox")&&(this.boxstats=this.content.game.livebox.sum_players)):(this.game=this.content.game,this.game_scroll_data=this.game.header,this.game_update=this.game.header)),this.game_scroll_data&&this.game_scroll_data.ls==1&&window.Echo.channel("gamebox."+this.content.params.gender+"."+this.content.params.div.toUpperCase()+"."+this.content.params.season+"."+this.game_scroll_data.gameid).listen("GameBox",o=>{if(console.log("Echo ",o),o.message.type=="game_scroll_data"){var t=o.message.data;
1t.pp.hasOwnProperty("pp_msg")&&(t.pp_msg=t.pp.pp_msg+" "+t.pp.pp_sub_msg,t.pp_sub_msg=t.pp.pp_sub_msg),this.$refs.head.update_game_data(t),this.game_update=t}else o.message.type=="plays"?this.$refs[o.message.type].add_play(o.message.data,1):o.message.type=="sum_players"?(this.game[o.message.type]=o.message.data,this.boxstats=o.message.data,console.log("sum_players",this.boxstats),this.boxstatsrefresh++):(this.game[o.message.type]=o.message.data,o.message.type=="summary"&&this.summaryrefresh++)}),this.game.hasOwnProperty("active_roster")){for(const[o,t]of Object.entries(this.game.active_roster))if(t.hasOwnProperty("gpid"))for(const[s,c]of Object.entries(t.gpid))s!=""&&(this.roster_map[s]=c,this.roster_map[o+"_"+c.pno]=c,this.roster_map["sn_"+o+"_"+c.shirtNumber]=c)}if(this.livebox&&this.livebox.hasOwnProperty("active_roster")){for(const[o,t]of Object.entries(this.livebox.active_roster))if(t.hasOwnProperty("gpid")){for(const[s,c]of Object.entries(t.gpid))if(s!=""&&c.lineNumber>0){const n=this.game.teams.teamInfo[o].team_loc_code,m=c.lineNumber-1;this.lines[n].hasOwnProperty(m)||(this.lines[n][m]={number:c.lineNumber,rw:"",lw:"",c:"",ld:"",rd:"",g:"",xs:""}),this.lines[n][m].number=c.lineNumber,this.lines[n][m][c.playingPosition.toLowerCase()]=c.name+" #"+c.shirtNumber}}}console.log("lines",this.lines)}},sn={class:"m-0 m-md-2 bg-white rounded p-0 p-md-2"},on={key:0},nn={key:0},an={class:"row mb-2 p-2 p-md-0 text-gameinfo"},ln={class:"col text-bold text-nowrap"},rn={class:"text-med-grey"},dn={class:"col text-bold text-nowrap"},cn={class:"text-med-grey"},mn={class:"col text-bold text-nowrap"},hn={key:0,class:"text-med-grey"},_n={key:0,class:"col text-bold text-nowrap"},un={class:"text-med-grey"},pn={key:1,class:"col text-bold text-nowrap"},gn={class:"text-med-grey"},yn={class:"col text-theme-secondary text-bold text-small"},fn={key:2,class:"col text-theme-secondary text-bold text-nowrap"},xn={key:0},bn={class:"row mb-2 p-2 p-md-0"},vn={key:0,id:"sidebar-container"},kn={key:1,id:"sidebar-container",class:"d-none d-md-block col-md-4 border-end border-1 table-responsive"},wn={class:"row"},On={class:"col"},Pn={id:"mainbox-container",class:"col-12 col-md-8"},In={class:"d-block d-md-none table-responsive"},Sn={class:"row"},Tn={class:"col"},Cn={key:1,class:"text-bold text-theme-secondary mb-4"},Fn={key:1,class:"text-bold text-theme-secondary mb-4"},Nn={class:"row w-100"},En={key:0,class:"col"},Dn={key:1,class:"col"},Gn={key:1};function Ln(o,t,s,c,n,m){const l=x("PageHead"),d=x("Head"),u=x("PerPeriod"),h=x("Totals"),_=x("Goals"),v=x("Penalties"),O=x("Goalies"),w=x("Summary"),I=E,C=x("Stats"),F=x("Lines"),L=x("Plays"),j=x("PostContent"),H=x("InsticatorComments"),A=D;return a(),i(f,null,[s.page.seo?(a(),P(l,{key:0,title:s.page.seo.title.substring(0,100),seo:s.page.seo,page:s.page},null,8,["title","seo","page"])):y("",!0),e("div",sn,[n.ready?(a(),i("div",on,[n.game?(a(),i("div",nn,[p(d,{game_scroll_data:n.game_scroll_data,game:n.game,ref:"head",page:s.page},null,8,["game_scroll_data","game","page"]),e("div",an,[e("div",ln,[t[8]||(t[8]=g(" Date:",-1)),t[9]||(t[9]=e("br",null,null,-1)),e("span",rn,r(n.game_scroll_data.game_day),1)]),e("div",dn,[t[10]||(t[10]=g(" Location:",-1)),t[11]||(t[11]=e("br",null,null,-1)),e("span",cn,r(n.game_scroll_data.arena_name),1)]),e("div",mn,[t[12]||(t[12]=g(" Game:",-1)),t[13]||(t[13]=e("br",null,null,-1)),n.game_scroll_data.game_type?(a(),i("span",hn,r(n.game_scroll_data.game_type.toUpperCase()),1)):y("",!0)]),s.content.game.hasOwnProperty("header")?(a(),i("div",_n,[t[14]||(t[14]=g(" Attendance:",-1)),t[15]||(t[15]=e("br",null,null,-1)),e("span",un,r(s.content.game.header.attendance),1)])):y("",!0),n.game_scroll_data.tv?(a(),i("div",pn,[t[16]||(t[16]=g(" TV:",-1)),t[17]||(t[17]=e("br",null,null,-1)),e("span",gn,r(n.game_scroll_data.tv),1)])):y("",!0),e("div",yn,r(n.game_update.last_play),1),n.game_scroll_data.pp_msg!=""&&n.game_scroll_data.complete!="Y"?(a(),i("div",fn,[g(r(n.game_update.pp_msg),1),n.game_update.pp_sub_msg?(a(),i("span",xn)):y("",!0)])):y("",!0)]),e("div",bn,[n.sidebar?(a(),i("div",kn,[e("div",null,[e("img",{src:"/images/sidebar-close.svg",onClick:t[1]||(t[1]=S=>m.toggleSidebar())})]),(a(),P(u,{summary:n.game.summary,periods:n.game.per,type:"scoring",key:n.summaryrefresh},null,8,["summary","periods"])),t[18]||(t[18]=e("hr",null,null,-1)),(a(),P(u,{summary:n.game.summary,periods:n.game.per,type:"shots",key:n.summaryrefresh},null,8,["summary","periods"])),t[19]||(t[19]=e("hr",null,null,-1)),e("div",wn,[e("div",On,[(a(),P(h,{summary:n.game.summary,key:n.summaryrefresh},null,8,["summary"]))])]),t[20]||(t[20]=e("hr",null,null,-1)),t[21]||(t[21]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Goals",-1)),p(_,{goals:n.game.goals,gender:this.content.params.gender,page:s.page,roster_map:n.roster_map},null,8,["goals","gender","page","roster_map"]),t[22]||(t[22]=e("hr",null,null,-1)),t[23]||(t[23]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Penalties",-1)),p(v,{penalties:n.game.penalties,gender:this.content.params.gender,roster_map:n.roster_map},null,8,["penalties","gender","roster_map"]),t[24]||(t[24]=e("hr",null,null,-1)),t[25]||(t[25]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Goaltending",-1)),p(O,{goalies:n.game.goalies,periods:n.game.per,gender:this.content.params.gender,page:s.page,roster_map:n.roster_map},null,8,["goalies","periods","gender","page","roster_map"])])):(a(),i("div",vn,[e("img",{class:"rotate-img",src:"/images/sidebar-close.svg",onClick:t[0]||(t[0]=S=>m.toggleSidebar())})])),e("div",Pn,[p(A,{modelValue:n.tabIndex,"onUpdate:modelValue":t[7]||(t[7]=S=>n.tabIndex=S),"content-class":"mt-3"},{default:T(()=>
1[p(I,{id:"0",title:"Summary","nav-class":"text-theme-secondary",onClick:t[2]||(t[2]=S=>m.changeTab(""))},{default:T(()=>[e("div",In,[(a(),P(u,{summary:n.game.summary,periods:n.game.per,type:"scoring",key:n.summaryrefresh},null,8,["summary","periods"])),t[26]||(t[26]=e("hr",null,null,-1)),(a(),P(u,{summary:n.game.summary,periods:n.game.per,type:"shots",key:n.summaryrefresh},null,8,["summary","periods"])),t[27]||(t[27]=e("hr",null,null,-1)),e("div",Sn,[e("div",Tn,[(a(),P(h,{summary:n.game.summary,key:n.summaryrefresh},null,8,["summary"]))])]),t[28]||(t[28]=e("hr",null,null,-1)),t[29]||(t[29]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Goals",-1)),p(_,{goals:n.game.goals,gender:this.content.params.gender,page:s.page,roster_map:n.roster_map},null,8,["goals","gender","page","roster_map"]),t[30]||(t[30]=e("hr",null,null,-1)),t[31]||(t[31]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Penalties",-1)),p(v,{penalties:n.game.penalties,gender:this.content.params.gender,roster_map:n.roster_map},null,8,["penalties","gender","roster_map"]),t[32]||(t[32]=e("hr",null,null,-1)),t[33]||(t[33]=e("div",{class:"text-bold text-larger text-theme-secondary"},"Goaltending",-1)),p(O,{goalies:n.game.goalies,periods:n.game.per,gender:this.content.params.gender,page:s.page,roster_map:n.roster_map},null,8,["goalies","periods","gender","page","roster_map"])]),n.boxstats?(a(),P(w,{gender:this.content.params.gender,game:n.game,boxstats:n.boxstats,ref:"summary",key:n.boxstatsrefresh,roster_map:n.roster_map},null,8,["gender","game","boxstats","roster_map"])):(a(),i("div",Cn,"Data currently not available"))]),_:1}),p(I,{id:"1",title:"Stats","nav-class":"text-theme-secondary",onClick:t[3]||(t[3]=S=>m.changeTab("Stats"))},{default:T(()=>[n.boxstats?(a(),P(C,{game:n.game,boxstats:n.boxstats,ref:"stats",key:n.boxstatsrefresh},null,8,["game","boxstats"])):(a(),i("div",Fn,"Data currently not available"))]),_:1}),n.livebox.hasOwnProperty("teams")?(a(),P(I,{key:0,id:"2",title:"Lines",onClick:t[4]||(t[4]=S=>m.changeTab("Lines"))},{default:T(()=>[p(F,{teams:n.livebox.teams,lines:n.lines},null,8,["teams","lines"])]),_:1})):y("",!0),p(I,{id:"3",title:"Shot Chart/Plays",onClick:t[5]||(t[5]=S=>m.changeTab("Plays"))},{default:T(()=>[p(L,{game:n.game,ref:"plays",page:s.page},null,8,["game","page"])]),_:1}),s.post.hasOwnProperty("post_content")?(a(),P(I,{key:1,id:"4",title:"Game Story",onClick:t[6]||(t[6]=S=>m.changeTab("GameStory"))},{default:T(()=>[p(j,{post:s.post},null,8,["post"]),p(H,{page:s.page},null,8,["page"])]),_:1})):y("",!0)]),_:1},8,["modelValue"]),e("div",Nn,[n.game.header.hasOwnProperty("ref")?(a(),i("div",En,[t[34]||(t[34]=e("span",{class:"text-bold"},"Ref:",-1)),g(" "+r(n.game.header.ref),1)])):y("",!0),n.game.header.hasOwnProperty("aref")?(a(),i("div",Dn,[t[35]||(t[35]=e("span",{class:"text-bold"},"Linesman:",-1)),g(" "+r(n.game.header.aref),1)])):y("",!0)])]),t[36]||(t[36]=e("div",null," Box scores by USCHO.com â U.S. College Hockey Online are compiled from official game box scores. Changes may have been made to the official box score after it was released to the media. Consequently, USCHO's box scores may disagree with reports published by other sources. ",-1))])])):(a(),i("div",Gn," Box data not available "))])):y("",!0)])],64)}const qn=k(en,[["render",Ln],["__scopeId","data-v-ccfaa542"]]);export{qn as default};
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.