1import{c as Z,d as ne,A as i,T as re,a as de,b as U,f as o,e,k as A,w as H,i as l,M as q,g as B,h as f,t as n,I as W,D as T,E as D,G as L,U as ue,V as me,S as F,R as ce,_ as pe,o as m,O as ve,j as fe,W as J,p as be}from"./DrlufBBD.js";import{u as ge}from"./XAl1oJda.js";import{U as X,L as ye}from"./BVYeCegL.js";import{U as he}from"./Otm7Gi5C.js";import{E as ke}from"./IKHjXg6d.js";import{S as Y}from"./tnS9CuL2.js";import{T as _e}from"./yH6OnAzg.js";import{E as Ue}from"./B7xoGB0s.js";import{L as we}from"./BVIvVPma.js";import{X as Ee}from"./BMBNO0uF.js";const xe=Z("badge-check",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Ie=Z("image-up",[["path",{d:"M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",key:"9csbqa"}],["path",{d:"m14 19.5 3-3 3 3",key:"9vmjn0"}],["path",{d:"M17 22v-5.5",key:"1aa6fl"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]),Ce={class:"account-page"},ze={class:"account-heading"},Te={class:"profile-avatar"},De=["src","alt"],Le={class:"account-layout"},Me=["aria-busy"],Ne={class:"panel-heading"},Pe={class:"public-disclosure"},Ve={class:"image-editor"},Ae={class:"image-preview"},Be=["src","alt"],Se={class:"image-editor-copy"},$e={class:"image-actions"},Oe={class:"image-select"},Re=["disabled"],je=["disabled","aria-busy"],Ke=["disabled","aria-busy"],Ge=["role"],He=["disabled"],qe=["disabled"],We={id:"bio-help"},Fe=["disabled"],Je=["disabled"],Xe={class:"public-preview"},Ye=["role"],Ze={class:"profile-actions"},Qe=["disabled","aria-busy"],el={class:"discord-panel"},ll={class:"panel-heading"},al=["disabled","aria-busy"],tl={class:"danger-panel"},sl=["disabled"],il={class:"danger-icon"},ol=["disabled"],nl={id:"delete-message",class:"message error",role:"alert","aria-live":"assertive"},rl={class:"modal-actions"},dl=["disabled"],ul=["disabled","aria-busy"],ml=ne({__name:"index",setup(cl){const s=ge(),y=i(s.displayName),w=i(s.user?.publicEmail||""),E=i(s.user?.homepageUrl||""),h=i(s.user?.bio||""),S=i(null),x=i(null),k=i(""),c=i(!1),p=i(!1),v=i(""),b=i(!1),d=i(!1),M=i(""),N=i(!1),_=i(!1),I=i(!1),g=i(""),u=i(!1),P=i(""),$=i(null),O=i(null),j=i(null);let K=null,R="";const Q=fe(()=>{const t=s.user?.discordId||"";return t.length>6?`${t.slice(0,3)}â¢â¢â¢â¢${t.slice(-3)}`:t}),C=()=>{k.value&&URL.revokeObjectURL(k.value),x.value=null,k.value="",S.value&&(S.value.value="")},ee=t=>{v.value="",b.value=!1;const a=t.target.files?.[0]||null;if(a){if(!["image/jpeg","image/png","image/webp"].includes(a.type)||a.size>5*1024*1024){C(),b.value=!0,v.value="JPG, PNG, WebP íìì 5MB ì´í ì´ë¯¸ì§ë¥¼ ì íí´ ì£¼ì¸ì.";return}C(),x.value=a,k.value=URL.createObjectURL(a)}},le=async()=>{if(!(!x.value||c.value||p.value)){c.value=!0,v.value="",b.value=!1;try{const t=new FormData;t.append("image",x.value);const a=await $fetch("/api/account/profile-image",{method:"PUT",body:t});s.user&&(s.user.profileImageUrl=a.profileImageUrl),C(),v.value="íë¡í ì¬ì§ì ì ì¥íìµëë¤."}catch(t){b.value=!0,v.value=t.data?.message||"íë¡í ì¬ì§ì ì ì¥íì§ ëª»íìµëë¤."}finally{c.value=!1}}},ae=async()=>{if(!(p.value||c.value)){p.value=!0,v.value="",b.value=!1;try{await $fetch("/api/account/profile-image",{method:"DELETE"}),s.user&&(s.user.profileImageUrl=""),C(),v.value="ë±ë¡í íë¡í ì¬ì§ì ìì íìµëë¤."}catch(t){b.value=!0,v.value=t.data?.message||"íë¡í ì¬ì§ì ìì íì§ ëª»íìµëë¤."}finally{p.value=!1}}},te=async()=>{if(!d.value){d.value=!0,M.value="",N.value=!1;try{const t=await $fetch("/api/account/profile",{method:"PATCH",body:{nickname:y.value,publicEmail:w.value,homepageUrl:E.value,bio:h.value}});s.user=t.user,y.value=t.user.displayName,w.value=t.user.publicEmail||"",E.value=t.user.homepageUrl||"",h.value=t.user.bio||"",M.value="ê³µê° íë¡íì ì ì¥íìµëë¤. ê´ë¦¬ì ìê° íì´ì§ì ë°ë¡ ë°ìë©ëë¤."}catch(t){N.value=!0,M.value=t.data?.message||"ëë¤ìì ë³ê²½íì§ ëª»íìµëë¤."}finally{d.value=!1}}},se=async()=>
1{if(!_.value){_.value=!0;try{await s.logout()}finally{_.value=!1}}},ie=async()=>{I.value||(K=document.activeElement instanceof HTMLElement?document.activeElement:$.value,R=document.body.style.overflow,document.body.style.overflow="hidden",I.value=!0,await F(),j.value?.focus())},V=()=>{u.value||(I.value=!1,g.value="",P.value="",document.body.style.overflow=R,F(()=>(K||$.value)?.focus()))},oe=t=>{if(t.key==="Escape"){t.preventDefault(),V();return}if(t.key!=="Tab"||!O.value)return;const a=Array.from(O.value.querySelectorAll('button:not(:disabled), input:not(:disabled), [href], [tabindex]:not([tabindex="-1"])'));if(!a.length)return;const z=a[0],r=a[a.length-1];t.shiftKey&&document.activeElement===z?(t.preventDefault(),r?.focus()):!t.shiftKey&&document.activeElement===r&&(t.preventDefault(),z?.focus())},G=async()=>{if(!(g.value!=="íìíí´"||u.value)){u.value=!0,P.value="";try{await $fetch("/api/account",{method:"DELETE",body:{confirmation:g.value}}),s.user=null,await ce("/")}catch(t){P.value=t.data?.message||"íì íí´ë¥¼ ì²ë¦¬íì§ ëª»íìµëë¤."}finally{u.value=!1}}};return re(()=>{C(),I.value&&(document.body.style.overflow=R)}),de({title:"íì ì ë³´ | ë°©íµì¤",meta:[{name:"robots",content:"noindex, nofollow"}]}),(t,a)=>{const z=pe;return m(),U("div",Ce,[o(z,{to:"/studio",class:"back-link"},{default:H(()=>[o(l(ve),{size:16,"aria-hidden":"true"}),a[5]||(a[5]=f(" ì§íµì¤ ìë´",-1))]),_:1}),e("header",ze,[e("div",Te,[l(s).avatarUrl?(m(),U("img",{key:0,src:l(s).avatarUrl,width:"62",height:"62",alt:`${l(s).displayName} íë¡í ì¬ì§`,decoding:"async",fetchpriority:"high"},null,8,De)):(m(),A(l(X),{key:1,size:28,"aria-hidden":"true"}))]),a[6]||(a[6]=e("div",null,[e("span",null,"MY ACCOUNT"),e("h1",null,"íì ì ë³´"),e("p",null,"ì½í
ì¸ ê´ë¦¬ì ê³µê° íë¡íê³¼ ë°©íµì¤ ê³ì ì ê´ë¦¬í©ëë¤.")],-1))]),e("div",Le,[e("form",{class:"profile-panel","aria-busy":l(d),onSubmit:q(te,["prevent"])},[e("div",Ne,[o(l(he),{size:21}),a[7]||(a[7]=e("div",null,[e("h2",null,"ê³µê° íë¡í ìì "),e("p",null,"ìë ì ë³´ë ê´ë¦¬ì ìê° íì´ì§ì ì ì ì½í
ì¸ ì ê³µê°ë©ëë¤.")],-1))]),e("div",Pe,[o(l(ke),{size:18,"aria-hidden":"true"}),a[8]||(a[8]=e("div",null,[e("strong",null,"ì
ë ¥í ì ë³´ë ê³µê° ì ë³´ì
ëë¤."),e("span",null,"íë¡í ì¬ì§, ëë¤ì, ìê°, ííì´ì§ì ì°ë½ì© ì´ë©ì¼ì ë구ë ë³¼ ì ììµëë¤. ì´ë©ì¼ ì문ì ì¬ë íì¸ì íµê³¼í 방문ììê²ë§ íìë©ëë¤.")],-1))]),e("div",Ve,[e("div",Ae,[l(k)||l(s).avatarUrl?(m(),U("img",{key:0,src:l(k)||l(s).avatarUrl||"",width:"86",height:"86",alt:`${l(s).displayName} íë¡í ì¬ì§ 미리보기`,decoding:"async"},null,8,Be)):(m(),A(l(X),{key:1,size:32,"aria-hidden":"true"}))]),e("div",Se,[a[9]||(a[9]=e("strong",null,"ê³µê° íë¡í ì¬ì§",-1)),a[10]||(a[10]=e("p",{id:"profile-image-help"},"ê³µê° ê´ë¦¬ì ìê° íì´ì§ì íìë©ëë¤. JPG, PNG, WebP · ìµë 5MB",-1)),e("div",$e,[e("label",Oe,[o(l(Ie),{size:16,"aria-hidden":"true"}),f(" "+n(l(s).user?.profileImageUrl?"ì¬ì§ ë³ê²½":"ì¬ì§ ë±ë¡")+" ",1),e("input",{ref_key:"imageInput",ref:S,type:"file",name:"profileImage",accept:"image/jpeg,image/png,image/webp","aria-describedby":"profile-image-help image-message",disabled:l(c)||l(p),onChange:ee},null,40,Re)]),l(x)?(m(),U("button",{key:0,type:"button",disabled:l(c)||l(p),"aria-busy":l(c),onClick:le},[o(l(Y),{size:16,"aria-hidden":"true"}
1),f(" "+n(l(c)?"ì ì¥ ì¤...":"ì¬ì§ ì ì¥"),1)],8,je)):B("",!0),l(s).user?.profileImageUrl?(m(),U("button",{key:1,type:"button",class:"image-delete",disabled:l(p)||l(c),"aria-busy":l(p),onClick:ae},[o(l(_e),{size:16,"aria-hidden":"true"}),f(" "+n(l(p)?"ìì ì¤...":"ì¬ì§ ìì "),1)],8,Ke)):B("",!0)]),e("span",{id:"image-message",class:W(["image-message",{error:l(b)}]),role:l(b)?"alert":"status","aria-live":"polite"},n(l(v)),11,Ge)])]),e("label",null,[a[11]||(a[11]=e("span",null,"ê´ë¦¬ì ëë¤ì",-1)),T(e("input",{"onUpdate:modelValue":a[0]||(a[0]=r=>L(y)?y.value=r:null),name:"nickname",required:"",minlength:"2",maxlength:"20",autocomplete:"nickname",disabled:l(d),"aria-describedby":"nickname-help",placeholder:"ê³µê°í ëë¤ì"},null,8,He),[[D,l(y),void 0,{trim:!0}]]),a[12]||(a[12]=e("small",{id:"nickname-help"},"2~20ì · íê¸, ì문, ì«ì, 공백, ë°ì¤, íì´í ì¬ì© ê°ë¥",-1))]),e("label",null,[a[13]||(a[13]=e("span",null,"ë´ ìê°",-1)),T(e("textarea",{"onUpdate:modelValue":a[1]||(a[1]=r=>L(h)?h.value=r:null),name:"bio",maxlength:"500",rows:"5",disabled:l(d),"aria-describedby":"bio-help",placeholder:"ì´ë¤ ì½í
ì¸ ë¥¼ ì´ìíëì§ ìê°í´ 주ì¸ì."},null,8,qe),[[D,l(h),void 0,{trim:!0}]]),e("small",We,"ê³µê° íë¡íì íìë©ëë¤. "+n(l(h).length)+"/500ì",1)]),e("label",null,[a[14]||(a[14]=e("span",null,"ê³µê° ì°ë½ì© ì´ë©ì¼",-1)),T(e("input",{"onUpdate:modelValue":a[2]||(a[2]=r=>L(w)?w.value=r:null),name:"publicEmail",type:"email",maxlength:"254",autocomplete:"email",disabled:l(d),"aria-describedby":"public-email-help",placeholder:"[email protected]"},null,8,Fe),[[D,l(w),void 0,{trim:!0}]]),a[15]||(a[15]=e("small",{id:"public-email-help"},"ê³µê° íë¡íìì ë¸ë¼ì¸ë ì²ë¦¬ëë©°, 방문ìê° ìº¡ì°¨ë¥¼ íµê³¼í ë¤ìë§ ì문ì ë³¼ ì ììµëë¤.",-1))]),e("label",null,[a[16]||(a[16]=e("span",null,"ííì´ì§ 주ì",-1)),T(e("input",{"onUpdate:modelValue":a[3]||(a[3]=r=>L(E)?E.value=r:null),name:"homepageUrl",type:"url",maxlength:"300",inputmode:"url",autocomplete:"url",disabled:l(d),"aria-describedby":"homepage-help",placeholder:"https://example.com"},null,8,Je),[[D,l(E),void 0,{trim:!0}]]),a[17]||(a[17]=e("small",{id:"homepage-help"},"ê³µê° íë¡íì ë§í¬ë¡ íìëë©° ì ì°½ìì ì´ë¦½ëë¤.",-1))]),e("div",Xe,[o(l(xe),{size:18}),e("div",null,[a[18]||(a[18]=e("small",null,"ì½í
ì¸ ê³µê° íì ìì",-1)),e("strong",null,n(l(y)||l(s).displayName)+" ê´ë¦¬ì ì´ì · ë¹ê³µì ì½í
ì¸ ",1)])]),e("div",{id:"profile-message",class:W(["message",{error:l(N)}]),role:l(N)?"alert":"status","aria-live":"polite"},n(l(M)),11,Ye),e("div",Ze,[e("button",{type:"submit",disabled:l(d),"aria-busy":l(d),"aria-describedby":"profile-message"},[o(l(Y),{size:17,"aria-hidden":"true"}),f(n(l(d)?"ì ì¥ ì¤...":"ê³µê° íë¡í ì ì¥"),1)],8,Qe),l(s).user?.id?(m(),A(z,{key:0,to:`/managers/${l(s).user.id}`,target:"_blank",rel:"noopener"},{default:H(()=>[a[19]||(a[19]=f("ë´ ê³µê° íë¡í 보기 ",-1)),o(l(Ue),{size:15,"aria-hidden":"true"})]),_:1},8,["to"])):B("",!0)])],40,Me),e("section",el,[e("div",ll,[o(l(we),{size:21}),a[20]||(a[20]=e("div",null,[e("h2",null,"ì°ê²°ë ê³ì "),e("p",null,"ë¡ê·¸ì¸ê³¼ ë³¸ì¸ íì¸ì ì¬ì©ë©ëë¤.")],-1))]),e("dl",null,[e("div",null,[a[21]||(a[21]=e("dt",null,"Discord ì¬ì©ìëª
",-1)),e("dd",null,n(l(s).user?.username),1)]),e("div",null,[a[22]||(a[22]=e("dt",null,"ê³ì ID",-1)),e("dd",null,n(l(Q)),1)])]),e("button",{type:"button",class:"logout-button",disabled:l(_),"aria-busy":l(_),onClick:se},[o(l(ye),{size:16,"aria-hidden":"true"}),f(" "+n(l(_)?"ë¡ê·¸ìì ì¤...":"ë¡ê·¸ìì"),1)],8,al)])]),e("section",tl,[e("div",null,[e("span",null,[o(l(J),{size:20})]),a[23]||(a[23]=e("div",null,[e("h2",null,"íì íí´"),e("p",null,"íí´íë©´ ë´ê° ë±ë¡í ì ì ì½í
ì¸ ì ì°ê²°ë ì¤í¸ë¦¬ë¨¸Â·ê³µì ê¶íì´ í¨ê» ìì ëë©° 복구í ì ììµëë¤.")],-1))]),e("button",{ref_key:"deleteTrigger",ref:$,type:"button",onClick:ie},"íì íí´",512)]),(m(),A(me,{to:"body"},[l(I)?(m(),U("div",{key:0,class:"modal-backdrop",onClick:q(V,["self"])},[e("section",{ref_key:"deleteModal",ref:O,class:"delete-modal",role:"dialog","aria-modal":"true","aria-labelledby":"delete-title","aria-describedby":"delete-description",onKeydown:oe},[e("button",{class:"modal-close",type:"button","aria-label":"íí´ ì°½ ë«ê¸°",disabled:l(u),onClick:V},[o(l(Ee),{size:19,"aria-hidden":"true"})],8,sl),e("span",il,[o(l(J),{size:24})]),a[24]||(a[24]=e("h2",{id:"delete-title"},"ì ë§ íí´íìê² ì´ì?",-1)),a[25]||(a[25]=e("p",{id:"delete-description"},[f("ë³´ì í ì ì ì½í
ì¸ ê° ëª¨ë ìì ë©ëë¤. ê³ìíë ¤ë©´ ìëì "),e("strong",null,"íìíí´"),f("를 ì
ë ¥í´ ì£¼ì¸ì.")],-1)),a[26]||(a[26]=e("label",{class:"sr-only",for:"delete-confirmation"},"íí´ íì¸ ë¬¸êµ¬",-1)),T(e("input",{id:"delete-confirmation",ref_key:"deleteConfirmationInput",ref:j,"onUpdate:modelValue":a[4]||(a[4]=r=>L(g)?g.value=r:null),autocomplete:"off",disabled:l(u),"aria-describedby":"delete-description delete-message",placeholder:"íìíí´",onKeyup:ue(G,["enter"])},null,40,ol),[[D,l(g)]]),e("div",nl,n(l(P)),1),e("div",rl,[e("button",{type:"button",disabled:l(u),onClick:V},"ì·¨ì",8,dl),e("button",{type:"button",disabled:l(g)!=="íìíí´"||l(u),"aria-busy":l(u),onClick:G},n(l(u)?"ì²ë¦¬ ì¤...":"ì구 íí´"),9,ul)])],544)])):B("",!0)]))])}}}),wl=be(ml,[["__scopeId","data-v-bddc1902"]]);export{wl 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.