1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3675],{7140:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/tournament/apply/write",function(){return a(85097)}])},87763:function(e,t,a){"use strict";var n=a(85893),i=a(9198),l=a.n(i),r=a(95570),c=a(78966),o=a(96026),s=a.n(o),d=a(67294),u=a(25675),p=a.n(u),h=a(30381),m=a.n(h);let v=e=>{var t,a,i,o,u,h,v,x;let f=s()(1900,(0,r.default)(new Date)+1,1),y=["01","02","03","04","05","06","07","08","09","10","11","12"],_=e=>{if(!e)return null;let t=m()(e,["YYYY-MM-DD","YYYY.MM.DD","MM/DD/YYYY"],!0);return t.isValid()?t:null},j=(0,d.forwardRef)((t,a)=>{let{value:i,onClick:l,inputType:r}=t,c=_(i);return(0,n.jsx)("span",{onClick:l,children:c?c.format("YYYY.MM.DD"):e.placeholder||""})});j.displayName="DatePicker";let g=null!=e&&!!e.inline&&!1!==e.inline&&(!0===e.inline||null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{display:"none"},"aria-hidden":"true",children:(0,n.jsx)(l(),{inline:!0,selected:null!==(u=null===(t=_(e.date))||void 0===t?void 0:t.toDate())&&void 0!==u?u:null,openToDate:null!==(h=null===(a=_(e.date))||void 0===a?void 0:a.toDate())&&void 0!==h?h:void 0,onChange:()=>{}})}),(0,n.jsx)(l(),{withPortal:!0,inline:g,dayClassName:e=>-1!=e.toString().indexOf("Sun")?"date_red":-1!=e.toString().indexOf("Sat")?"date_blue":"",customInput:(0,n.jsx)(j,{value:e.date}),renderCustomHeader:e=>{let{date:t,changeYear:a,changeMonth:i,decreaseMonth:l,increaseMonth:o,prevMonthButtonDisabled:s,nextMonthButtonDisabled:d}=e;return(0,n.jsxs)("div",{style:{marginTop:10,marginBottom:5,justifyContent:"center",alignItems:"center"},children:[(0,n.jsx)("button",{className:"btn-decrease",onClick:l,disabled:s,children:(0,n.jsx)(p(),{width:14,height:14,src:"/images/icon/arrow_left.svg",alt:"decrease"})}),(0,n.jsx)("select",{value:(0,r.default)(t),onChange:e=>{let{target:{value:t}}=e;return a(t)},children:f.map(e=>(0,n.jsx)("option",{value:e,children:e},e))}),(0,n.jsx)("select",{value:y[(0,c.default)(t)],onChange:e=>{let{target:{value:t}}=e;return i(y.indexOf(t))},children:y.map(e=>(0,n.jsx)("option",{value:e,children:e},e))}),(0,n.jsx)("button",{className:"btn-increase",onClick:o,disabled:d,children:(0,n.jsx)(p(),{width:14,height:14,src:"/images/icon/arrow_right.svg",alt:"increase"})})]})},selected:null!==(v=null===(i=_(e.date))||void 0===i?void 0:i.toDate())&&void 0!==v?v:null,openToDate:null!==(x=null===(o=_(e.date))||void 0===o?void 0:o.toDate())&&void 0!==x?x:void 0,onChange:t=>{e.action(m()(t).format("YYYY-MM-DD"))}},e.date)]})};t.Z=v},79126:function(e,t,a){"use strict";var n=a(85893);let i=e=>{let t=void 0===e.tabMenus?null:e.tabMenus,a="";return e.classNameArr&&(a=e.classNameArr.find(function(e){if("fixed"==e)return!0})),(0,n.jsx)("header",{className:a,children:(0,n.jsxs)("div",{className:"container",children:[(0,n.jsxs)("div",{className:"header_tab",children:[e.left,(0,n.jsx)("h5",{className:"title",children:e.center}),(0,n.jsx)("div",{className:"header_btn_area",children:e.right})]}),null==t?null:(0,n.jsx)("div",{className:"header_tab_menu",children:(0,n.jsx)("ul",{children:t.data.map((e,a)=>(0,n.jsx)("li",{className:"".concat(t.type==e.type?"on":"off"),children:(0,n.jsxs)("a",{onClick:t=>{t.preventDefault,e.action(e.type)},children:[(0,n.jsx)("img",{src:"/images/icon/ipt_chk.svg"}),e.title]})},"tab-index-".concat(a)))})})]})})};t.Z=i},85097:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return x}});var n=a(85893),i=a(79126),l=a(25675),r=a.n(l),c=a(37737),o=a(9473),s=a(11163),d=a(67294),u=a(87763),p=a(76727);a(30381);var h=a(64664),m=a(72387);let v=e=>{var t,a,l,v,x,f;let{token:y}=e;(0,p.O)(null==y?void 0:y.accessToken,null==y?void 0:y.refreshToken);let _=(0,o.v9)(e=>e.apply),j=(0,s.useRouter)(),g=(0,o.I0)(),N=j.query.idx,[b,w]=(0,d.useState)(null),[C,k]=(0,d.useState)(!1),[S,T]=(0,d.useState)(null),[E,Z]=(0,d.useState)(""),A=(e,t)=>{let a=JSON.parse(JSON.stringify(_)),n=!1;if("level"===e.target.name){let t=a.team[N].level;k(n="10"===e.target.value||"11"===e.target.value),n?a.team[N].age="01":("10"===t||"11"===t)&&(a.team[N].age="")}void 0!=t?"player1"==t?a.team[N][e.target.name][0]=e.target.value:"player2"
1==t&&(a.team[N][e.target.name][1]=e.target.value):a.team[N][e.target.name]=e.target.value,g(c.IW(a))},D=e=>{let t=JSON.parse(JSON.stringify(_));t.team[N].player_birth_day[0]=e,g(c.IW(t))},Y=e=>{let t=JSON.parse(JSON.stringify(_));t.team[N].player_birth_day[1]=e,g(c.IW(t))},O=()=>{let e=_.team[N],t="10"===e.level||"11"===e.level;if(!e.team_name){alert("íëª
ì ì
ë ¥í´ì£¼ì¸ì.");return}if(!e.event){alert("ì¢
목ì ì íí´ì£¼ì¸ì.");return}if(!e.level){alert("ê¸ì를 ì íí´ì£¼ì¸ì.");return}if(!t&&!e.age){alert("ì°ë ¹ë를 ì íí´ì£¼ì¸ì.");return}for(let t=0;t<2;t++){if(!e.player_name[t]){alert("ì ì ".concat(t+1,"ì ì´ë¦ì ì
ë ¥í´ì£¼ì¸ì."));return}if(!e.player_phone[t]){alert("ì ì ".concat(t+1,"ì ì°ë½ì²ë¥¼ ì
ë ¥í´ì£¼ì¸ì."));return}if(!e.player_birth_day[t]){alert("ì ì ".concat(t+1,"ì ìë
ìì¼ì ì
ë ¥í´ì£¼ì¸ì."));return}}j.back()};async function M(e){var t,a;let n=await (0,h.c9)(e);if((null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.code)=="SUCCESS"){let e={};(e=n.data.data).SUB_DATA=n.data.sub_data;let t=[];(null===(a=e.SUB_DATA)||void 0===a?void 0:a.EVENTS.length)>0&&e.SUB_DATA.EVENTS.map(e=>{t.push(null==b?void 0:b.competition_event[e.EVENT])}),e.SUB_DATA.EVENTS=t,T(n.data.data);let i="10"===_.team[N].level||"11"===_.team[N].level;k(i)}}return((0,d.useEffect)(()=>{(0,m.U)(w)},[]),(0,d.useEffect)(()=>{var e;if(!_.tournament_idx){alert("ì못ë ì ê·¼ì
ëë¤."),j.replace("/");return}if(void 0===(null==_?void 0:_.team[N])){alert("ì못ë ì ê·¼ì
ëë¤."),j.push("/tournament/apply");return}if(!(null==y?void 0:null===(e=y.info)||void 0===e?void 0:e.MEMBER_IDX)){alert("ë¡ê·¸ì¸ì´ íìí ìë¹ì¤ ì
ëë¤."),j.push("/member/login");return}b&&M(_.tournament_idx)},[b]),null==S)?null:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.Z,{left:(0,n.jsx)("button",{type:"button",className:"btn_icon",onClick:()=>{let e=0;if(Object.keys(_.team[N]).map(t=>{"player_name"==_.team[N][t]||"player_phone"==_.team[N][t]?_.team[N][t].map(t=>{!t&&++e}):!_.team[N][t]&&++e}),e>0){if(!0===window.confirm("ì
ë ¥íì§ ìì ê°ì´ ììµëë¤. ì ì¥íì§ìê³ ë¤ë¡ ê°ìê² ìµëê¹?")){let e=JSON.parse(JSON.stringify(_));e.team[N]=e.teamForm,g(c.IW(e)),j.back();return}}else j.back()},children:(0,n.jsx)(r(),{src:"/images/header/back.svg",alt:"close",placeholder:"close",width:14,height:14})}),center:"ì ì²ì ìì±"}),(0,n.jsx)("main",{children:(0,n.jsx)("section",{className:"common_section",children:(0,n.jsxs)("div",{className:"container",children:[(0,n.jsx)("div",{className:"step_title_area",children:(0,n.jsxs)("div",{className:"step_title",children:[(0,n.jsx)("h4",{className:"strong",children:"ëí ì ì²ì ìì±"}),(0,n.jsxs)("h6",{className:"h6",children:["ëí ì ì²ì ìí´ íìí",(0,n.jsx)("br",{}),"ì 보를 ì
ë ¥í´ ì£¼ì¸ì."]})]})}),(0,n.jsxs)("div",{className:"apply_info_area",children:[(0,n.jsxs)("div",{className:"ipt_area",children:[(0,n.jsx)("h5",{className:"apply_info_title strong",children:"íëª
/ìì ì
ë ¥"}),(0,n.jsx)("div",{className:"apply_ipt_box",children:(0,n.jsx)("label",{className:"apply_ipt_box_label",children:(0,n.jsx)("input",{value:null==_?void 0:_.team[N].team_name,onChange:A,type:"text",name:"team_name",maxLength:"20",placeholder:"íëª
ì ì
ë ¥í´ì£¼ì¸ì."})})})]}),(0,n.jsxs)("div",{className:"ipt_area",children:[(0,n.jsx)("h5",{className:"apply_info_title strong",children:"ì¢
목ì í"}),(0,n.jsx)("div",{className:"apply_ipt_box",children:(0,n.jsx)("div",{className:"apply_ipt_radio double",children:null===(t=S.SUB_DATA)||void 0===t?void 0:null===(a=t.EVENTS)||void 0===a?void 0:a.map((e,t)=>"ë¨ë³µ"==e?(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{onChange:A,type:"radio",name:"event",value:"01",checked:(null==_?void 0:_.team[N].event)=="01"}),(0,n.jsx)("span",{children:null==b?void 0:b.competition_event["01"]})]},"event-idx-".concat(t)):"ì¬ë³µ"==e?(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{onChange:A,type:"radio",name:"event",value:"02",checked:(null==_?void 0:_.team[N].event)=="02"}),(0,n.jsx)("span",{children:null==b?void 0:b.competition_event["02"]})]},"event-idx-".concat(t)):"í¼ë³µ"==e?(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{onChange:A,type:"radio",name:"event",value:"
103",checked:(null==_?void 0:_.team[N].event)=="03"}),(0,n.jsx)("span",{children:null==b?void 0:b.competition_event["03"]})]},"event-idx-".concat(t)):"ë¨ì²´"==e?(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{onChange:A,type:"radio",name:"event",value:"04",checked:(null==_?void 0:_.team[N].event)=="04"}),(0,n.jsx)("span",{children:null==b?void 0:b.competition_event["04"]})]},"event-idx-".concat(t)):null)})})]}),(0,n.jsxs)("div",{className:"ipt_area",children:[(0,n.jsx)("h5",{className:"apply_info_title strong",children:"ê¸ìì í"}),(0,n.jsx)("div",{className:"apply_ipt_box",children:(0,n.jsx)("div",{className:"apply_ipt_radio double",children:null===(l=S.SUB_DATA)||void 0===l?void 0:null===(v=l.LEVELS)||void 0===v?void 0:v.map((e,t)=>(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{onChange:A,type:"radio",name:"level",value:e.C_LEVEL,checked:_.team[N].level==e.C_LEVEL}),(0,n.jsx)("span",{children:b.level[e.C_LEVEL]})]},"level-idx-".concat(t)))})})]}),(0,n.jsxs)("div",{className:"ipt_area",style:C?{display:"none"}:{},children:[(0,n.jsx)("h5",{className:"apply_info_title strong",children:"ì°ë ¹ë ì í"}),(0,n.jsx)("div",{className:"apply_ipt_box",children:(0,n.jsx)("div",{className:"apply_ipt_radio double",children:null===(x=S.SUB_DATA)||void 0===x?void 0:null===(f=x.AGE_RANGES)||void 0===f?void 0:f.map((e,t)=>(0,n.jsxs)("label",{children:[(0,n.jsx)("input",{onChange:A,type:"radio",name:"age",value:e.AGE_RANGE,checked:e.AGE_RANGE==_.team[N].age}),(0,n.jsxs)("span",{children:[b.age_range[e.AGE_RANGE],S.SUB_DATA.AGE_RANGES.length-1===t&&S.SUB_DATA.AGE_RANGES.length>4?" ì´ì":""]})]},"age-idx-".concat(t)))})})]}),(0,n.jsxs)("div",{className:"apply_team_ipt",children:[(0,n.jsxs)("div",{className:"player_detail",children:[(0,n.jsx)("h5",{children:"ì ì 1"}),(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:[(0,n.jsxs)("span",{children:["ì´ë¦",(0,n.jsx)("em",{className:"highlight",children:"*"})]}),(0,n.jsx)("label",{children:(0,n.jsx)("input",{onChange:e=>{A(e,"player1")},type:"text",name:"player_name",value:null==_?void 0:_.team[N].player_name[0],placeholder:"ì´ë¦ì ì
ë ¥í´ì£¼ì¸ì.",required:!0})})]}),(0,n.jsxs)("li",{children:[(0,n.jsxs)("span",{children:["ì°ë½ì²",(0,n.jsx)("em",{className:"highlight",children:"*"})]}),(0,n.jsx)("label",{children:(0,n.jsx)("input",{maxLength:11,onChange:e=>{!0!==isNaN(e.target.value)&&A(e,"player1")},type:"text",name:"player_phone",value:null==_?void 0:_.team[N].player_phone[0],placeholder:"ì°ë½ì²ë¥¼ ì
ë ¥í´ì£¼ì¸ì.",required:!0})})]}),(0,n.jsxs)("li",{children:[(0,n.jsxs)("span",{children:["ìë
ìì¼",(0,n.jsx)("em",{className:"highlight",children:"*"})]}),(0,n.jsx)("label",{children:(0,n.jsx)("div",{className:"custom-date-picker",children:(0,n.jsx)(u.Z,{date:null==_?void 0:_.team[N].player_birth_day[0],action:D})})})]})]})]}),(0,n.jsxs)("div",{className:"player_detail",children:[(0,n.jsx)("h5",{children:"ì ì 2"}),(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:[(0,n.jsxs)("span",{children:["ì´ë¦",(0,n.jsx)("em",{className:"highlight",children:"*"})]}),(0,n.jsx)("label",{children:(0,n.jsx)("input",{onChange:e=>{A(e,"player2")},type:"text",name:"player_name",value:null==_?void 0:_.team[N].player_name[1],placeholder:"ì´ë¦ì ì
ë ¥í´ì£¼ì¸ì.",required:!0})})]}),(0,n.jsxs)("li",{children:[(0,n.jsxs)("span",{children:["ì°ë½ì²",(0,n.jsx)("em",{className:"highlight",children:"*"})]}),(0,n.jsx)("label",{children:(0,n.jsx)("input",{maxLength:11,onChange:e=>{!0!==isNaN(e.target.value)&&A(e,"player2")},type:"text",name:"player_phone",value:null==_?void 0:_.team[N].player_phone[1],placeholder:"ì°ë½ì²ë¥¼ ì
ë ¥í´ì£¼ì¸ì.",required:!0})})]}),(0,n.jsxs)("li",{children:[(0,n.jsxs)("span",{children:["ìë
ìì¼",(0,n.jsx)("em",{className:"highlight",children:"*"})]}),(0,n.jsx)("label",{children:(0,n.jsx)("div",{className:"custom-date-picker",children:(0,n.jsx)(u.Z,{date:null==_?void 0:_.team[N].player_birth_day[1],action:Y})})})]})]})]})]})]})]})})}),(0,n.jsx)("footer",{children:(0,n.jsx)("section",{className:"button_section",children:(0,n.jsx)("button",{onClick:()=>{O()},className:"full_button",type:"button",children:"ì ì¥"})})})]})};var x=!0;t.default=v},76727:function(e,t,a){"use strict";a.d(t,{O:function(){return c}});var n=a(6154),i=a(22115);let l="",r="",c=(e,t)=>{l=e,r=t},o=n.Z.create();o.interceptors.request.use(e=>(e.headers.Authorization="Bearer ".concat(l),e)),o.interceptors.response.use(e=>e,async e=>{let{config:t,response:{status:a}}=e;if(401===a){let e=t,{data:a}
1=await (0,n.Z)({url:"".concat((0,i.Z)("https://ddakplay.com"),"/api/server/tokenRefresh"),method:"post",data:{refreshToken:r}}).then(e=>"SUCCESS"===e.data.code?e:(0,n.Z)({url:"".concat((0,i.Z)("https://ddakplay.com"),"/api/server/getToken"),method:"get"})).catch(e=>{if(401===e.response.status)return(0,n.Z)({url:"".concat((0,i.Z)("https://ddakplay.com"),"/api/server/getToken"),method:"get"})});return a?(c(null==a?void 0:a.token,r),e.headers={authorization:"Bearer ".concat(null==a?void 0:a.token),"Content-Type":"multipart/form-data"}):await (0,n.Z)({method:"post",url:"".concat((0,i.Z)("https://ddakplay.com"),"/api/cookie/removeItem"),data:{key:["refreshToken","accessToken"]}}),(0,n.Z)(e)}return console.log("response error",e),Promise.reject(e)}),t.Z=o},72387:function(e,t,a){"use strict";a.d(t,{U:function(){return c},l:function(){return r}});var n=a(6154),i=a(76727);let l="https://api.ddakplay.com";async function r(e){return await (0,n.Z)({url:"".concat(l,"/api/common/getSiGunGu/").concat(e),method:"get"}).then(e=>e).catch(e=>{console.log("error: ".concat(e))})}async function c(e){await (0,i.Z)({url:"".concat(l,"/api/common/codeData"),method:"get"}).then(t=>(e(t.data),t.data)).catch(e=>{console.log("error: ".concat(e))})}},64664:function(e,t,a){"use strict";a.d(t,{Ft:function(){return u},Gc:function(){return o},JD:function(){return N},Pg:function(){return f},RO:function(){return g},S0:function(){return j},S3:function(){return _},Wx:function(){return s},YE:function(){return h},Z3:function(){return p},c9:function(){return d},d7:function(){return x},eT:function(){return l},fY:function(){return c},jT:function(){return r},qm:function(){return y},ri:function(){return v},t_:function(){return m}});var n=a(76727);let i="https://api.ddakplay.com";async function l(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/apply"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function r(e){return await (0,n.Z)({url:"".concat(i,"/api/competition/applyView/").concat(e),method:"get"}).then(e=>e).catch(e=>e)}async function c(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/applyModify"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function o(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/write"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function s(e){return await (0,n.Z)({url:"".concat(i,"/api/competition/list").concat(e),method:"get"}).then(e=>e).catch(e=>e)}async function d(e){return await (0,n.Z)({url:"".concat(i,"/api/competition/view/").concat(e),method:"get"}).then(e=>e).catch(e=>e)}async function u(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/like"),method:"post",data:{idx:e}}).then(e=>e).catch(e=>e)}async function p(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/pay"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function h(e,t){return await (0,n.Z)({url:"".concat(i,"/inis/makeHash?P_AMT=").concat(e,"&P_OID=").concat(t),method:"get"}).then(e=>e).catch(e=>e)}async function m(e,t,a){return await (0,n.Z)({url:"".concat(i,"/api/competition/allApplyList/").concat(e,"/").concat(t,"?idx=").concat(a),method:"get"}).then(e=>e).catch(e=>e)}async function v(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/updateApplyStatus"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function x(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/applyCancel"),method:"post",data:{idx:e}}).then(e=>e).catch(e=>e)}async function f(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/competitionTossPaymentDelete"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function y(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/competitionTossPayment"),method:"post",data:e}).then(e=>e.data).catch(e=>e)}async function _(e){return await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/competitionTossPaymentComplete"),method:"post",data:e}).then(e=>e).catch(e=>e)}async function j(e){let t=await (0,n.Z)({headers:{"Content-Type":"multipart/form-data"},url:"".concat(i,"/api/competition/checkChangeTeam"),method:"post",data:{idx:e}}).then(e=>e).catch(e=>e);return t}async function g(e){return await (0,n.Z)({url:"".concat(i,"/api/competition/applyOptions/").concat(e),method:"get"}).then(e=>e).catch(e=>e)}
1async function N(e){let{competition_idx:t,event:a,age:l,level:r}=e;return await (0,n.Z)({url:"".concat(i,"/api/competition/participants?competition_idx=").concat(t,"&event=").concat(a,"&age=").concat(l,"&level=").concat(r),method:"get"}).then(e=>e).catch(e=>e)}},22115:function(e,t){"use strict";t.Z=function(e){if("undefined"==typeof window)return;if(-1==window.location.host.indexOf("www"))return e;let t=e.split("://");return t[0]+"://www."+t[1]}}},function(e){e.O(0,[5675,6154,198,9774,2888,179],function(){return e(e.s=7140)}),_N_E=e.O()}]);
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.