1import{_ as ee}from"./q2BJrez8.js";import{_ as te}from"./BqoCcMzP.js";import{_ as oe}from"./evu-QIW2.js";import{_ as se}from"./DAdfajvO.js";import{_ as ae}from"./C7dbits7.js";import{_ as ie}from"./DGgotYRj.js";import{u as ne,_ as re}from"./Bxepk5q0.js";import{e as le}from"./BaH6CAb2.js";import{d as ce,g as me,J as ue,k as pe,e as de,f as _e,ag as ye,ax as fe,ay as ve,aw as F,h as ge,G as R,c as n,u as e,n as g,b as r,m as s,D as he,t as m,H as xe,p as U,K as be,a as G,j as we,s as y,r as f,az as ke,E as Ce,o as i}from"./BgwL-FNm.js";import{u as Se}from"./YmqZGrTA.js";import{u as Ae}from"./gbcvBJ9P.js";import"./DlAUqK2U.js";import"./CCI47m-J.js";import"./DxwERUVw.js";import"./DU2Z8xpN.js";import"./D8g0h32n.js";import"./BBYZjxun.js";import"./0LHIlgqr.js";import"./D1L8XAuH.js";import"./C7TYNl2W.js";import"./DxvMOv2V.js";import"./CT83ECQS.js";import"./CoMIUfFR.js";import"./D5Fg_pjD.js";import"./LPOviz3I.js";import"./DzW1BeEe.js";import"./tL-E8aS0.js";import"./Bstu6jgA.js";import"./BirpfG5M.js";import"./DMSK8fnT.js";import"./BogsaNbj.js";const $e={class:"player-profile"},Pe={key:0,class:"flex justify-center py-20"},Te={key:1,class:"bg-[#212121] pb-8 text-white"},Ee={key:0,class:"mt-4 text-center font-bold"},Ne={class:"mt-1 text-center font-bold"},Le={key:1,class:"mt-1 text-center text-[12px]"},Ie={class:"mt-6 flex justify-center gap-3"},Me={key:0,class:"flex items-center justify-center gap-1 rounded border border-[#95989A] bg-white px-3",style:{height:"24px"}},Oe=["src"],je={key:0,class:"text-[10px] text-[#606060]"},De=["src"],ze={key:2,class:"mt-12 px-4"},Be={class:"text-[14px] whitespace-pre-line"},Fe={key:3,class:"mt-8"},Re={class:"mt-6 px-4"},Ue={key:0,class:"mb-5 flex items-center border-b border-white py-3"},Ge={class:"text-[16px]"},Ve={key:1,class:"mb-5 flex items-center border-b border-white py-3"},Ke={class:""},He={key:2,class:"mb-5 flex items-center border-b border-white py-3"},Xe={class:""},Ye={key:3,class:"mb-5 flex items-center border-b border-white py-3"},Je={class:""},qe={key:2,class:"bg-[#eee] pb-20"},Qe={key:0,class:"flex justify-center py-8"},Et=ce({__name:"index",async setup(We){let b,P;const T=me(),A=we(),$=ue(),w=Se(),E=pe(),N=de(),h=_e(),V=ye(),k=ne(),v=y(()=>T.params.id),p=y(()=>T.params.playerId),L=`${A.public.apiHost}/${A.public.apiVersion}`,I={"Content-Type":"application/json","X-API-KEY":A.public.apiKey,"X-ENGATE-DOMAIN":Ce},M=f(null),{data:c}=([b,P]=fe(async()=>ke(`player-seo-${v.value}-${p.value}`,async()=>{try{const[a,t]=await Promise.all([$fetch(`${L}/communities/${v.value}/profile`,{headers:I}),$fetch(`${L}/user/${p.value}/profile`,{headers:I}).catch(()=>null)]);return{community:a,playerExists:!!t?.user,playerName:t?.player?.name??t?.user?.name??null,playerAvatar:t?.user?.avatar??null}}catch{return null}})),b=await b,P(),b),O=c.value?.community?.code;if(O&&ve.includes(O))throw F({statusCode:404,data:{backLink:"/",backLabel:"TOPãã¼ã¸ã«æ»ã"}});if(c.value?.community&&(M.value=c.value.community,Ae({community:c.value.community,pageType:"players-detail",pageSuffix:"é¸æè©³ç´°",playerId:p.value,playerName:c.value.playerName,playerAvatar:c.value.playerAvatar})),c.value&&!c.value.playerExists)throw F({statusCode:404,data:{backLink:`/communities/${v.value}/`,backLabel:"ãã¼ã TOPã«æ»ã"}});const o=f(null),u=f(null),d=f(!1),_=f(!1),x=f(0),C=f(!1),j=y(()=>V.communityIds),D=y(()=>u.value?.favorites?j.value.length===0?u.value.favorites:u.value.favorites.filter(a=>j.value.includes(a.player.community_id)):[]),z=y(()=>u.value?.follows?u.value.follows:[]),K=y(()=>o.value?.header_img?{"background-image":`url(${o.value.header_img})`}:{"background-image":`url(${String(k.currentProfile?.logo??M.value?.logo??"")})`,"background-color":"#000","background-size":"auto 100%"});async function H(){if(!N.isAuthenticated){h.showAcknowledgement({code:"#0090000",message:""});return}try{if(_.value){const{code:a,message:t}=await $.delete(`/players/${p.value}/favorite`);h.showAcknowledgement({code:a,message:t})}else{const{code:a,message:t}=await $.post(`/players/${p.value}/favorite`);h.showAcknowledgement({code:a,message:t})}_.value=!_.value,x.value=_.value?x.value+1:x.value-1,await N.fetchUser()}catch(a){a instanceof R&&h.showAcknowledgement({code:a.code,message:a.message})}}async function B(a){await w.fetchUserPosts(p.value,a)}async function X(){E.startMoreLoading(),await B("add"),E.stopMoreLoading()}const Y=y(()=>k.currentProfile??void 0);return ge(async()=>{w.reset(),w.setShowGift(!0),C.value=!0,c.value?.community&&k.setCurrentCommunityProfileFromSsr(v.value,c.value.community);
1const a=k.setCurrentCommunityProfile(v.value).catch(()=>{}),t=$.get(`/user/${p.value}/profile`,{skipAuth:!0}).then(async l=>{o.value=l.player,u.value=l.user,_.value=l.player.is_favorite??!1,x.value=l.player.favorites_num??0,d.value=!0,l.player.community_id&&await w.fetchReplyStamps(String(l.player.community_id))}),S=B("init").finally(()=>{C.value=!1});try{await Promise.all([a,t,S])}catch(l){if(l instanceof R)h.showAcknowledgement({code:l.code,message:l.message});else throw l}finally{d.value=!0,C.value=!1}}),(a,t)=>{const S=ee,l=te,J=oe,q=se,Q=ae,W=ie,Z=re;return i(),n("div",$e,[e(d)?r("",!0):(i(),n("div",Pe,[g(S,{size:"md"})])),e(d)&&e(o)?(i(),n("section",Te,[s("div",{class:"w-full bg-cover bg-center bg-no-repeat pt-[36.5%]",style:he(e(K))},null,4),g(l,{class:"mx-auto -mt-11",icon:{image:e(u)?.avatar??"",size:"56px"}},null,8,["icon"]),e(o).player_num?(i(),n("p",Ee,m(e(o).player_num),1)):r("",!0),s("h2",Ne,m(e(o).name),1),e(o).position?(i(),n("p",Le," ãã¸ã·ã§ã³  "+m(e(o).position),1)):r("",!0),s("div",Ie,[e(o).star>0?(i(),n("div",Me,[t[0]||(t[0]=s("span",{class:"text-[10px] text-[#606060]"},"ã®ããè¿ä¿¡ç",-1)),s("img",{src:`/assets/img/icon/star${e(o).star}.svg`,alt:"",class:"h-3"},null,8,Oe),e(o).star_title?(i(),n("span",je,m(e(o).star_title),1)):r("",!0)])):r("",!0),s("button",{class:xe(["flex items-center justify-center gap-1 rounded border border-[#1565C0] px-3 text-[10px] text-[#1565C0]",e(_)?"bg-[#E4E4E4]":"bg-white"]),style:{height:"24px","min-width":"104px"},onClick:H},[s("img",{src:e(_)?"/assets/img/icon/check.svg":"/assets/img/icon/plus.svg",width:"14",height:"14",alt:""},null,8,De),U(" "+m(e(x))+"ããæ°ã«å
¥ã ",1)],2)]),g(J,{to:`/communities/${e(v)}/players/${e(p)}/ranking/`,class:"mx-auto mt-6 flex items-center justify-center gap-2 rounded border border-black bg-white px-4 text-[10px] font-medium text-[#181818] shadow-[0_2px_0_#BCBCBC]",style:{height:"30px",width:"144px"}},{default:be(()=>[...t[1]||(t[1]=[s("span",{class:"icontext-crown_black"},null,-1),U(" ã®ãã¿ã¼ã©ã³ãã³ã° ",-1)])]),_:1},8,["to"]),e(o).profile?(i(),n("div",ze,[s("p",Be,m(e(o).profile),1)])):r("",!0),(e(z).length>0||e(D).length>0)&&e(u)?(i(),n("div",Fe,[t[2]||(t[2]=s("h3",{class:"px-4 text-[10px]"},"ãæ°ã«å
¥ã",-1)),g(q,{"following-communities":e(z),"favorite-players":e(D),class:"mt-4"},null,8,["following-communities","favorite-players"])])):r("",!0),s("div",Re,[e(o).birthday?(i(),n("div",Ue,[t[3]||(t[3]=s("span",{class:"w-30 text-[10px]"},"èªçæ¥",-1)),s("span",Ge,m(e(le)(e(o).birthday)),1)])):r("",!0),e(o).birthplace?(i(),n("div",Ve,[t[4]||(t[4]=s("span",{class:"w-30 text-[10px]"},"åºèº«å°",-1)),s("span",Ke,m(e(o).birthplace),1)])):r("",!0),e(o).former_high_school?(i(),n("div",He,[t[5]||(t[5]=s("span",{class:"w-30 text-[10px]"},"åºèº«é«æ ¡",-1)),s("span",Xe,m(e(o).former_high_school),1)])):r("",!0),e(o).former_college?(i(),n("div",Ye,[t[6]||(t[6]=s("span",{class:"w-30 text-[10px]"},"åºèº«å¤§å¦",-1)),s("span",Je,m(e(o).former_college),1)])):r("",!0)])])):r("",!0),e(d)?(i(),n("div",qe,[g(Q,{class:"mx-6 mt-6"}),e(C)?(i(),n("div",Qe,[g(S,{size:"md"})])):(i(),G(W,{key:1,"is-ready":e(d),"community-info":e(Y),class:"pt-6",onOnLoadMore:X},null,8,["is-ready","community-info"]))])):r("",!0),e(d)?(i(),G(Z,{key:3,"initial-player-customer-id":e(o)?.customer_id??e(u)?.customer_id},null,8,["initial-player-customer-id"])):r("",!0)])}}});export{Et 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.