PageSourceSearch

https://www.wowple.com/_nuxt/CyLcFFdn.js

js wowple.com collected 2026-10-02 00:36:03 UTC 51,467 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./D01_u2Yj.js","./B7lTcWLE.js","./entry.DgOxuhhz.css"])))=>i.map(i=>d[i]);
2import{f as yt,g as _t,x as bt,v as mt,s as ft,Q as wt,k as Rt,h as fe,aV as kt,H as we,r as g,o as i,A as Ct,w as Re,d as X,l as e,a as t,t as o,e as M,B as m,c as d,F as y,G as R,m as c,K as ke,V as At,C as ee,L as Ce,U as Ue,D as b,I as de,E as $e,_ as Dt}from"./B7lTcWLE.js";import{_ as Nt}from"./CD_lHf65.js";import{_ as Lt}from"./C8eTUCrf.js";import{_ as Et}from"./CXsL4gWa.js";import{_ as Tt}from"./rH8ginVy.js";import{u as St}from"./BdHRgecS.js";import{u as Pt}from"./vw9Uwsqt.js";import{u as Mt}from"./BI9Yyq_F.js";import{u as jt}from"./C-2zdcHB.js";function Bt(ce){const j=(ce??"").replace(/\D/g,"");return j.length<7?ce??"":`${j.slice(0,3)}-****-${j.slice(-4)}`}const Ot={class:"text-xl font-bold text-gray-900"},It={class:"mt-0.5 text-sm text-gray-500"},Ut={class:"grid grid-cols-2 gap-3 sm:grid-cols-4"},$t={class:"rounded-2xl bg-white border border-gray-100 p-4 shadow-[0_2px_12px_rgba(0,0,0,0.04)]"},Ft={class:"text-xs text-gray-400"},Gt={class:"mt-1 text-2xl font-bold text-gray-900"},Yt={class:"text-sm font-medium ml-0.5"},Vt={class:"rounded-2xl bg-white border border-gray-100 p-4 shadow-[0_2px_12px_rgba(0,0,0,0.04)]"},Ht={class:"text-xs text-gray-400"},zt={class:"mt-1 text-2xl font-bold text-wowple-600"},Kt={class:"text-sm font-medium ml-0.5"},qt={class:"rounded-2xl bg-white border border-gray-100 p-4 shadow-[0_2px_12px_rgba(0,0,0,0.04)]"},Wt={class:"text-xs text-gray-400"},Xt={class:"mt-1 text-lg font-bold text-emerald-600"},Jt={class:"rounded-2xl bg-white border border-gray-100 p-4 shadow-[0_2px_12px_rgba(0,0,0,0.04)]"},Qt={class:"text-xs text-gray-400"},Zt={class:"mt-1 text-xl font-bold text-gray-700"},es={class:"text-emerald-500"},ts={class:"text-red-400"},ss={class:"flex items-center justify-between"},os={class:"flex gap-1 rounded-xl bg-gray-100 p-1"},as={key:0,class:"rounded-2xl bg-white border border-gray-100 shadow-[0_2px_12px_rgba(0,0,0,0.04)]"},ns={class:"flex items-center justify-between px-5 py-4 border-b border-gray-100"},rs=["aria-label"],ls={class:"text-base font-bold text-gray-900"},is=["aria-label"],ds={class:"grid grid-cols-7 border-b border-gray-50"},cs={key:0,class:"grid grid-cols-7"},us=["onClick"],ps={class:"space-y-0.5"},gs={key:0,class:"rounded px-1.5 py-0.5 text-[9px] font-bold bg-amber-100 text-amber-700 truncate"},hs={key:1,class:"rounded px-1.5 py-0.5 text-[9px] font-bold bg-blue-100 text-blue-700 truncate"},xs={key:2,class:"rounded px-1.5 py-0.5 text-[9px] font-bold bg-emerald-100 text-emerald-700 truncate"},vs={key:0,class:"mt-1 text-[9px] text-gray-400"},ys={key:1,class:"border-t border-gray-100"},_s={class:"flex items-center justify-between px-5 py-3"},bs={class:"text-sm font-bold text-gray-800"},ms={class:"text-xs text-gray-400"},fs={key:0,class:"px-5 py-10 text-center text-sm text-gray-400"},ws={key:1,class:"px-5 py-10 text-center text-sm text-gray-400"},Rs={key:2,class:"divide-y divide-gray-50"},ks=["onClick"],Cs={class:"w-14 shrink-0 text-center"},As={class:"text-xs font-bold text-gray-700"},Ds={class:"text-[10px] text-gray-400"},Ns={key:1,class:"text-xs text-gray-300"},Ls={class:"flex-1 min-w-0"},Es={class:"flex items-center gap-2"},Ts={class:"text-[10px] font-mono text-gray-400"},Ss={key:0,class:"rounded-full px-2 py-0.5 text-[10px] font-bold bg-amber-50 text-amber-700 border border-amber-200 whitespace-nowrap"},Ps={class:"font-semibold text-gray-900 truncate mt-0.5"},Ms={class:"text-xs text-gray-500 truncate"},js={key:0,class:"text-gray-400"},Bs={class:"text-right shrink-0 flex items-center gap-1.5"},Os={class:"font-bold text-gray-900 text-sm"},Is={key:2,class:"px-4 py-3 text-xs text-gray-400 border-t border-gray-50"},Us={key:1,class:"rounded-2xl bg-white border border-gray-100 shadow-[0_2px_12px_rgba(0,0,0,0.04)]"},$s={class:"border-b border-gray-100 px-4 py-3"},Fs={class:"flex flex-col gap-2 px-4 py-3 border-b border-gray-50 md:flex-row md:flex-wrap md:items-center"},Gs=["aria-label","placeholder"],Ys={class:"hidden md:inline text-xs text-gray-400 font-semibold"},Vs={class:"flex items-center gap-2"},Hs={class:"relative min-w-0 flex-1 md:w-44 md:flex-none"},zs={class:"relative min-w-0 flex-1 md:w-44 md:flex-none"},Ks={class:"flex items-center gap-2 md:contents"},qs={class:"hidden md:inline text-xs text-gray-400"},Ws={class:"text-xs text-gray-400 md:hidden"},Xs={key:0,class:"flex flex-col items-center gap-3 py-16 text-center"},Js={class:"text-base font-semibold text-gray-400"},Qs={class:"lg:hidden space-y-2 px-4 py-3"},Zs=["onClick"],eo={class:"flex-1 min-w-0"},to={class:"flex items-center gap-2 mb-1"},so={class:"text-[11px] font-mono text-gray-400"},oo={key:0,class:"rounded-full px-2 py-0.5 text-[10px] font-bold bg-amber-50 text-amber-700 border border-amber-200 whitespace-nowrap"},ao={class:"font-semibold text-gray-900 truncate"},no={class:"text-sm text-gray-500 mt-0.5"},ro={key:0,class:"text-xs text-gray-400"},lo={class:"text-right shrink-0 ml-3"},io={class:"font-bold text-gray-900"},co={class:"hidden lg:block overflow-x-auto"},uo={class:"w-full min-w-[700px] text-sm"},po={class:"border-b border-gray-100 bg-gray-50/50"},go={class:"py-3 px-4 text-left text-xs font-bold text-gray-500"},ho={class:"py-3 px-4 text-left text-xs font-bold text-gray-500"},xo={class:"py-3 px-4 text-left text-xs font-bold text-gray-500"},vo={class:"py-3 px-4 text-left text-xs font-bold text-gray-500"},yo={class:"py-3 px-4 text-right text-xs font-bold text-gray-500"},_o={class:"py-3 px-4 text-center text-xs font-bold text-gray-500"},bo={class:"py-3 px-4 text-center text-xs font-bold text-gray-500"},mo={class:"divide-y divide-gray-50"},fo=["onClick"],wo={class:"py-3.5 px-4 font-mono text-xs text-gray-500 font-semibold"},Ro={class:"py-3.5 px-4"},ko={class:"font-semibold text-gray-800 truncate max-w-[160px]"},Co={class:"text-xs text-gray-400 truncate max-w-[160px]"},Ao={class:"py-3.5 px-4"},Do={class:"font-semibold text-gray-800"},No={class:"text-xs text-gray-400"},Lo={class:"py-3.5 px-4"},Eo={class:"text-sm font-semibold text-gray-800"},To={key:0,class:"text-xs text-gray-400"},So={class:"py-3.5 px-4 text-right font-bold text-gray-800"},Po={class:"py-3.5 px-4 text-center"},Mo={key:0,class:"ml-1 rounded-full px-2 py-0.5 text-[10px] font-bold bg-amber-50 text-amber-700 border border-amber-200 whitespace-nowrap"},jo={key:0,class:"flex items-center justify-center gap-1 px-4 py-4 border-t border-gray-50"},Bo=["disabled"],Oo={key:0,class:"px-1 text-gray-400 text-sm"},Io=["onClick"],Uo={key:0,class:"px-1 text-gray-400 text-sm"},$o=["disabled"],Fo={key:0,class:"fixed inset-y-0 right-0 z-[60] flex flex-col bg-white shadow-2xl",style:{width:"min(480px, 100vw)"}},Go={class:"flex items-center justify-between px-5 py-4 border-b border-gray-100 shrink-0"},Yo={class:"flex items-center gap-2.5"},Vo={class:"text-base font-bold text-gray-900"},Ho={class:"rounded-md bg-gray-100 px-2 py-0.5 text-xs text-gray-500 font-mono"},zo=["aria-label"],Ko={key:0,class:"flex-1 overflow-y-auto"},qo={class:"px-5 py-4 space-y-5"},Wo={class:"flex items-center justify-between"},Xo={key:0,class:"rounded-full px-2.5 py-1 text-[11px] font-bold bg-amber-50 text-amber-700 border border-amber-200"},Jo={key:1,class:"text-xs text-gray-400 font-semibold"},Qo={class:"rounded-xl bg-gray-50 px-4 py-3.5 space-y-1.5"},Zo={class:"text-xs font-bold text-gray-400 uppercase tracking-wider"},ea={class:"text-sm font-bold text-gray-900"},ta={class:"text-sm text-gray-600"},sa={class:"text-xs text-gray-400"},oa={class:"rounded-xl border border-gray-100 px-4 py-3.5"},aa={class:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-2"},na={class:"flex items-center gap-3"},ra={class:"text-sm font-bold text-gray-900"},la={class:"text-xs text-gray-500 mt-0.5"},ia={class:"rounded-xl border border-gray-100 px-4 py-3.5"},da={class:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-3"},ca={class:"space-y-2"},ua={class:"flex justify-between text-sm"},pa={class:"text-gray-500"},ga={class:"font-semibold text-gray-900"},ha={class:"flex justify-between text-sm"},xa={class:"text-gray-500"},va=["href"],ya={key:0,class:"pt-2 border-t border-gray-50"},_a={class:"text-xs text-gray-400 mb-1"},ba={class:"text-sm text-gray-700 leading-relaxed"},ma={class:"rounded-xl border border-gray-100 px-4 py-3.5"},fa={class:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-3"},wa={class:"space-y-2 text-sm"},Ra={class:"flex justify-between"},ka={class:"text-gray-500"},Ca={class:"text-gray-800"},Aa={key:0,class:"flex justify-between"},Da={class:"text-gray-500"},Na={class:"text-gray-800"},La={key:1,class:"flex justify-between"},Ea={class:"text-gray-500"},Ta={class:"text-red-500"},Sa={class:"flex justify-between pt-2 border-t border-gray-100 font-bold"},Pa={class:"text-gray-800"},Ma={class:"text-gray-900 text-base"},ja={key:0,class:"mt-3 pt-3 border-t border-gray-50 space-y-1.5"},Ba={class:"text-xs font-bold text-gray-400"},Oa={class:"rounded-xl border border-gray-100 px-4 py-3.5"},Ia={class:"text-xs font-bold text-gray-400 uppercase tracking-wider mb-3"},Ua={class:"space-y-2 text-sm"},$a={class:"flex justify-between"},Fa={class:"text-gray-500"},Ga={class:"text-gray-800"},Ya={key:0,class:"flex justify-between"},Va={class:"text-gray-500"},Ha={class:"text-gray-800"},za={key:1,class:"flex justify-between"},Ka={class:"text-gray-500"},qa={class:"text-gray-800"},Wa={key:2,class:"flex justify-between"},Xa={class:"text-gray-500"},Ja={class:"text-gray-800"},Qa={class:"flex justify-between font-semibold"},Za={class:"text-gray-700"},en={class:"text-gray-900"},tn={key:0,class:"rounded-xl border border-red-100 bg-red-50/50 px-4 py-3.5"},sn={class:"text-xs font-bold text-red-400 uppercase tracking-wider mb-3"},on={key:0,class:"ml-1.5 rounded bg-gray-800 px-1.5 py-0.5 text-[10px] font-bold text-white normal-case align-middle"},an={class:"space-y-2 text-sm"},nn={class:"flex justify-between"},rn={class:"text-gray-500"},ln={class:"text-gray-800"},dn={key:0,class:"flex justify-between"},cn={class:"text-gray-500"},un={class:"text-gray-800"}
2,pn={key:1,class:"flex justify-between font-semibold"},gn={class:"text-gray-700"},hn={class:"text-red-500"},xn={key:2,class:"flex justify-between"},vn={class:"text-gray-500"},yn={class:"text-gray-800"},_n={key:1,class:"rounded-xl border border-emerald-100 bg-emerald-50/50 px-4 py-3.5"},bn={class:"text-xs font-bold text-emerald-500 uppercase tracking-wider mb-3"},mn={class:"space-y-2 text-sm"},fn={key:0,class:"flex justify-between"},wn={class:"text-gray-500"},Rn={class:"text-gray-800"},kn={class:"flex justify-between font-semibold"},Cn={class:"text-gray-700"},An={class:"text-emerald-600"},Dn={key:1,class:"flex justify-between"},Nn={class:"text-gray-500"},Ln={class:"text-xs text-gray-500"},En={class:"rounded-xl border border-gray-100 px-4 py-3.5"},Tn={class:"flex items-center justify-between mb-2"},Sn={class:"text-xs font-bold text-gray-400 uppercase tracking-wider"},Pn={key:0,class:"space-y-2"},Mn=["aria-label","placeholder"],jn={class:"flex justify-end gap-2"},Bn=["disabled"],On={key:1,class:"text-sm text-gray-600 leading-relaxed whitespace-pre-line"},In={class:"text-xs text-gray-400 text-right"},Un={key:1,class:"shrink-0 border-t border-gray-100 px-5 py-4 flex gap-3"},$n=["disabled","onClick"],Fn={key:2,class:"shrink-0 max-h-[72%] overflow-y-auto border-t-2 border-red-100 bg-white px-5 py-4 space-y-3 shadow-[0_-10px_28px_rgba(0,0,0,0.08)]"},Gn={class:"text-[16px] font-black text-gray-900"},Yn={class:"mt-0.5 text-xs text-gray-400"},Vn={key:0,class:"flex items-center justify-center py-4"},Hn={class:"rounded-lg bg-white border border-gray-100 px-3 py-2.5"},zn={class:"text-xs font-bold text-gray-400 mb-1.5"},Kn={key:0,class:"space-y-1"},qn={key:1,class:"text-xs text-gray-400"},Wn={class:"rounded-lg bg-white border border-gray-100 px-3 py-2.5 space-y-1.5 text-xs"},Xn={class:"flex justify-between"},Jn={class:"text-gray-500"},Qn={class:"text-gray-800 font-semibold"},Zn={class:"flex justify-between"},er={class:"text-gray-500"},tr={class:"text-gray-800"},sr={key:0,class:"text-red-500"},or={class:"flex justify-between"},ar={class:"text-gray-500"},nr={class:"text-gray-800 font-semibold"},rr={key:0,class:"flex justify-between"},lr={class:"text-gray-500"},ir={class:"text-gray-800"},dr={key:0,class:"rounded-lg bg-amber-50 border border-amber-200 px-3 py-2 text-xs text-amber-700"},cr={class:"grid grid-cols-3 gap-2"},ur=["onClick"],pr={key:1,class:"flex items-center gap-2"},gr=["max","placeholder","aria-label"],hr={class:"text-xs text-gray-500 shrink-0"},xr={class:"flex justify-between items-center rounded-lg bg-white border border-red-100 px-3 py-2.5"},vr={class:"text-sm font-bold text-gray-700"},yr={class:"text-base font-bold text-red-500"},_r={key:0,class:"ml-1 rounded bg-gray-800 px-1.5 py-0.5 text-[10px] font-bold text-white align-middle"},br={class:"grid grid-cols-2 gap-2"},mr=["onClick"],fr={class:"flex gap-2 pt-1"},wr=["disabled"],Rr=10,kr=yt({__name:"index",async setup(ce){let j,Ae;const{t:s,locale:ue}=_t();St({title:s("host.reservationManage"),noindex:!0});const{apiGetHostReservations:De,apiGetReservationStats:Fe,apiGetReservationDetail:Ge,apiUpdateReservationStatus:Ne,apiCancelReservation:Le,apiUpdateReservationMemo:Ye,apiSyncReservationStatus:Ve,apiGetReservationCalendar:He,apiGetReservationRefundPreview:ze}=([j,Ae]=bt(()=>$e(()=>import("./D01_u2Yj.js"),__vite__mapDeps([0,1,2]),import.meta.url)),j=await j,Ae(),j),{confirm:pe,alert:ge}=mt(),{show:f}=ft(),{withActionLoading:te}=Pt(),se=Mt(),J=g(!0),oe=g(null),W=g(null),ae=g(""),U=g(""),$=g(""),F=g(""),B=g(1),G=b(()=>oe.value?.items??[]),Ee=b(()=>oe.value?.totalCnt??0),O=b(()=>oe.value?.totalPages??0),Y=b(()=>{const n=O.value;if(n<=7)return Array.from({length:n},(h,v)=>v+1);const r=B.value,u=Math.max(1,Math.min(r-3,n-6));return Array.from({length:Math.min(7,n)},(h,v)=>u+v)}),k=g(null);wt(()=>k.value!=null,()=>{k.value=null},"hostResvDetail");const l=g(null),he=g(!1),V=g(!1),H=g(""),ne=g(!1),N=g(!1),I=g(""),C=g(!1),_=g(null),re=g(!1),L=g("POLICY"),z=g(null),Ke=["PENDING_APPROVAL","PENDING_PAYMENT"],Q=b(()=>!Ke.includes(l.value?.reservationStatus??"")&&(l.value?.payAmt??0)>0&&!!l.value?.payDate),le=b(()=>{const n=_.value;if(!n)return 0;if(L.value==="FULL")return n.payAmt;if(L.value==="CUSTOM"){const r=z.value??0;return Math.max(0,Math.min(r,n.payAmt))}return n.refundAmt}),qe=b(()=>{const n=_.value;if(!n||n.sameDayAsPayment||n.useBeforeDay>=8||!n.rules.length)return-1;let r=-1;
2return n.rules.forEach((u,h)=>{u.dayBefore>=n.useBeforeDay&&(r===-1||u.dayBefore<n.rules[r].dayBefore)&&(r=h)}),r});async function We(){if(N.value){N.value=!1;return}if(N.value=!0,I.value="",L.value="POLICY",z.value=null,_.value=null,!l.value||!Q.value)return;re.value=!0;const n=await ze(l.value.reservationNo).catch(()=>null);n?.result_cd==="0000"?_.value=n.result_data:f(s("host.pgReservations.refundLoadErrorMsg"),"error"),re.value=!1}const Xe=b(()=>({PENDING_APPROVAL:{label:s("host.pgReservations.statusPendingApproval"),cls:"bg-amber-50 text-amber-700 border border-amber-200"},PENDING_PAYMENT:{label:s("host.pgReservations.statusPendingPayment"),cls:"bg-orange-50 text-orange-600 border border-orange-200"},PAYING:{label:s("host.pgAnalytics.status.paying"),cls:"bg-orange-50 text-orange-600 border border-orange-200"},CONFIRMED:{label:s("host.confirmed"),cls:"bg-blue-50 text-blue-600 border border-blue-200"},IN_PROGRESS:{label:s("host.inUse"),cls:"bg-wowple-50 text-wowple-600 border border-wowple-200"},COMPLETED:{label:s("host.pgReservations.statusCompleted"),cls:"bg-emerald-50 text-emerald-600 border border-emerald-200"},CANCELLED:{label:s("host.cancel"),cls:"bg-red-50 text-red-500 border border-red-200"},CANCELLED_BY_USER:{label:s("host.pgReservations.statusCancelledByUser"),cls:"bg-red-50 text-red-500 border border-red-200"},CANCELLED_BY_HOST:{label:s("host.pgReservations.statusCancelledByHost"),cls:"bg-red-50 text-red-500 border border-red-200"},CANCELLED_UNPAID:{label:s("host.pgReservations.statusCancelledUnpaid"),cls:"bg-gray-100 text-gray-500 border border-gray-200"},CANCELLED_NO_RESPONSE:{label:s("host.pgReservations.statusCancelledNoResponse"),cls:"bg-gray-100 text-gray-500 border border-gray-200"}})),Je=b(()=>({TIME:s("host.pgReservations.bookingTypeTime"),PACKAGE:s("host.pgReservations.bookingTypePackage"),OFFICE:s("host.pgReservations.bookingTypeOffice"),STAY:s("host.pgReservations.bookingTypeStay")})),Te=b(()=>({CHANGE_SCHEDULE:s("host.pgReservations.cancelReasonSchedule"),DUPLICATE_BOOKING:s("host.pgReservations.cancelReasonDuplicate"),IMPROPER_USE:s("host.pgReservations.cancelReasonImproper"),CONSTRUCTION:s("host.pgReservations.cancelReasonConstruction"),ETC:s("host.pgReservations.cancelReasonEtc")})),xe=g([]),Se=b(()=>xe.value.length?xe.value:Object.entries(Te.value).map(([n,r])=>({v:n,l:r}))),Pe=b(()=>[{id:"",label:s("host.all")},{id:"PENDING_APPROVAL",label:s("host.pgReservations.statusPendingApproval")},{id:"PENDING_PAYMENT",label:s("host.pgReservations.statusPendingPayment")},{id:"CONFIRMED",label:s("host.confirmed")},{id:"IN_PROGRESS",label:s("host.inUse")},{id:"COMPLETED",label:s("host.pgReservations.statusCompleted")},{id:"CANCELLED",label:s("host.cancel")}]);async function E(n=B.value){J.value=!0,B.value=n;const r=await De({status:ae.value||void 0,fromDay:U.value||void 0,toDay:$.value||void 0,search:F.value||void 0,branchNo:se.selectedId??void 0,page:n,size:Rr}).catch(()=>null);if(r?.result_cd==="0000"){oe.value=r.result_data;const u=r.result_data?.totalPages??0;if(u>=1&&n>u)return J.value=!1,E(u)}J.value=!1}async function Me(){const n=await Fe().catch(()=>null);n?.result_cd==="0000"&&(W.value=n.result_data)}Rt(async()=>{Ve().catch(()=>null);const n=String(fe().query.status??"");n&&Pe.value.some(u=>u.id===n)&&(ae.value=n);const r=String(fe().query.keyword??"");r&&(F.value=r),String(fe().query.view??"")==="calendar"&&(A.value="calendar"),kt().then(u=>{xe.value=u.map(h=>({v:h,l:h}))}).catch(()=>{}),await Promise.all([E(1),Me()])}),we(()=>se.selectedId,()=>E(1));function Qe(n){ae.value=n,E(1)}function Z(n){n<1||n>O.value||(E(n),ve())}async function ie(n){k.value=n,he.value=!0,l.value=null,V.value=!1,N.value=!1;const r=await Ge(n).catch(()=>null);r?.result_cd==="0000"?(l.value=r.result_data,H.value=r.result_data.memo??""):(f(s("host.pgReservations.loadDetailErrorMsg"),"error"),k.value=null),he.value=!1}function ve(){k.value=null,l.value=null,N.value=!1,V.value=!1}const{triggerBadgeRefresh:Ze}=jt();async function ye(n){Ze();const r=[E(),Me(),ie(n)];A.value==="calendar"&&(r.push(me()),D.value&&r.push(Oe(D.value))),await Promise.all(r)}async function et(n,r){if(!l.value||!await pe(s("host.pgReservations.confirmStatusChangeMsg",{label:r}),{type:"warning",confirmText:r,cancelText:s("host.cancel")}))return;const h=l.value.reservationNo;C.value=!0;try{const v=await te(()=>Ne(h,n));v.result_cd==="0000"?(await ge(s("host.pgReservations.statusChangeDoneMsg",{label:r}),{type:"success"}),await ye(h)):f(de(v.result_msg,s("host.pgReservations.processFailedMsg")),"error")}catch{f(s("host.pgReservations.serverErrorMsg"),"error")}finally{C.value=!1}}async function tt(){if(!l.value||!await pe(s("host.pgReservations.confirmOnsitePaymentMsg"),{type:"warning",confirmText:s("host.pgReservations.onsiteReceivedConfirmBtn"),cancelText:s("host.cancel")}))return;const r=l.value.reservationNo;C.value=!0;try{const u=await te(()=>Ne(r,"COMPLETED"));u.result_cd==="0000"?(await ge(s("host.pgReservations.onsitePaymentDoneMsg"),{type:"success"}),await ye(r)):f(de(u.result_msg,s("host.pgReservations.processFailedMsg")),"error")}catch{f(s("host.pgReservations.serverErrorMsg"),"error")}finally{C.value=!1}}async function st(){if(!l.value||!I.value){f(s("host.pgReservations.selectCancelReasonMsg"),"error");return}const n=Q.value&&!!_.value;if(n&&L.value==="CUSTOM"){const v=z.value;if(v==null||v<0||v>(_.value?.payAmt??0)){f(s("host.pgReservations.refundAmountInvalidMsg"),"error");return}}const r=n?s("host.pgReservations.confirmCancelRefundMsg",{amount:x(le.value)}):s("host.pgReservations.confirmCancelMsg");if(!await pe(r,{type:"warning",confirmText:s("host.pgReservations.cancelProcessBtn"),cancelText:s("host.pgReservations.closeBtn")}))return;const h=l.value.reservationNo;C.value=!0;try{const v=await te(()=>n?Le(h,I.value,L.value,L.value==="CUSTOM"?z.value??0:void 0):Le(h,I.value));v.result_cd==="0000"?(await ge(s("host.pgReservations.cancelDoneMsg"),{type:"success"}),N.value=!1,await ye(h)):f(de(v.result_msg,s("host.pgReservations.cancelFailedMsg")),"error")}catch{f(s("host.pgReservations.serverErrorMsg"),"error")}finally{C.value=!1}}async function ot(){if(l.value){ne.value=!0;try{const n=await te(()=>Ye(l.value.reservationNo,H.value));n.result_cd==="0000"?(l.value.memo=H.value,V.value=!1,f(s("host.pgReservations.memoSavedMsg"),"success")):f(de(n.result_msg,s("host.pgReservations.saveFailedMsg")),"error")}catch{f(s("host.pgReservations.serverErrorMsg"),"error")}finally{ne.value=!1}}}async function at(){if(!G.value.length){f(s("host.pgReservations.noDataToDownloadMsg"),"error");return}const n={no:s("host.reservationId"),space:s("host.space"),product:s("host.pgReservations.productLabel"),branch:s("host.pgReservations.branchLabel"),guest:s("host.guest"),contact:s("host.pgReservations.contactLabel"),date:s("host.pgReservations.reservationDateLabel"),time:s("host.pgReservations.usageTimeLabel"),amount:s("host.amount"),status:s("host.statusLabel"),regDate:s("host.spaceCardRegDate")},r=G.value.map(p=>({[n.no]:p.reservationNo,[n.space]:p.spaceNm??"",[n.product]:p.productNm??"",[n.branch]:p.branchNm??"",[n.guest]:p.bookerNm,[n.contact]:p.bookerMobile,[n.date]:p.reservationDay,[n.time]:p.startTime?`${p.startTime}~${p.endTime}`:"",[n.amount]:p.payAmt>0?p.payAmt:p.totalAmt,[n.status]:T(S(p)).label,[n.regDate]:p.regDate})),u=await $e(()=>import("./CNerDvZX.js"),[],import.meta.url),h=u.utils.json_to_sheet(r);h["!cols"]=Object.values(n).map(p=>
2({wch:Math.max(10,String(p).length+2)}));const v=u.utils.book_new();u.utils.book_append_sheet(v,h,s("host.pgReservations.csvFileNamePrefix"));const q=new Date,a=`${q.getFullYear()}-${String(q.getMonth()+1).padStart(2,"0")}-${String(q.getDate()).padStart(2,"0")}`;u.writeFile(v,`${s("host.pgReservations.csvFileNamePrefix")}_${a}.xlsx`)}function x(n){return s("common.currency",{amount:(n??0).toLocaleString()})}function T(n){return Xe.value[n]??{label:n,cls:"bg-gray-100 text-gray-500"}}function S(n){if(n.reservationStatus!=="CONFIRMED"||!n.checkinDate||!n.checkoutDate)return n.reservationStatus;const r=Date.now(),u=new Date(n.checkinDate.replace(" ","T")).getTime(),h=new Date(n.checkoutDate.replace(" ","T")).getTime();return Number.isNaN(u)||Number.isNaN(h)?n.reservationStatus:u<=r&&r<h?"IN_PROGRESS":n.reservationStatus}const je=b(()=>{if(!l.value)return[];const n=l.value.reservationStatus,r=l.value.payDiv==="ONSITE"||l.value.payDiv==="NONE",u=[];return n==="PENDING_APPROVAL"?(u.push({status:"CONFIRMED",label:s("host.pgReservations.actionApprove"),cls:"bg-blue-500 hover:bg-blue-600 text-white"}),u.push({cancel:!0,label:s("host.pgReservations.actionRejectCancel"),cls:"border border-red-300 text-red-500 hover:bg-red-50"})):n==="CONFIRMED"?(r&&u.push({onsite:!0,label:s("host.pgReservations.actionOnsiteReceived"),cls:"bg-emerald-500 hover:bg-emerald-600 text-white"}),u.push({cancel:!0,label:s("host.pgReservations.actionCancelReservation"),cls:"border border-red-300 text-red-500 hover:bg-red-50"})):n==="PENDING_PAYMENT"&&u.push({cancel:!0,label:s("host.pgReservations.actionCancelReservation"),cls:"border border-red-300 text-red-500 hover:bg-red-50"}),u}),nt=b(()=>["CANCELLED","CANCELLED_BY_USER","CANCELLED_BY_HOST","CANCELLED_UNPAID","CANCELLED_NO_RESPONSE"].includes(l.value?.reservationStatus??"")),A=g("list"),P=g(`${new Date().getFullYear()}-${String(new Date().getMonth()+1).padStart(2,"0")}`),Be=g([]),_e=g(!1),D=g(null),K=g([]),be=g(!1);async function me(){_e.value=!0;const n=await He(P.value,se.selectedId??void 0).catch(()=>null);n?.result_cd==="0000"&&(Be.value=n.result_data),_e.value=!1}function rt(){const n=new Date(P.value+"-01");n.setMonth(n.getMonth()-1),P.value=n.toISOString().slice(0,7)}function lt(){const n=new Date(P.value+"-01");n.setMonth(n.getMonth()+1),P.value=n.toISOString().slice(0,7)}we(P,()=>{D.value=null,K.value=[],A.value==="calendar"&&me()}),we(A,n=>{n==="calendar"&&me()});function it(n){if(D.value===n){D.value=null,K.value=[];return}D.value=n,Oe(n)}async function Oe(n){be.value=!0,K.value=[];const r=await De({fromDay:n,toDay:n,branchNo:se.selectedId??void 0,page:1,size:100}).catch(()=>null);r?.result_cd==="0000"&&(K.value=r.result_data.items),be.value=!1}const dt=b(()=>{if(!D.value)return"";const n=new Date(D.value+"T00:00:00");return new Intl.DateTimeFormat(Ie[ue.value]??"ko-KR",{year:"numeric",month:"long",day:"numeric",weekday:"short"}).format(n)});function ct(n){return Be.value.find(r=>r.reservationDate===n)??null}const ut=b(()=>{const n=P.value.split("-").map(Number),r=n[0],u=n[1],h=new Date(r,u-1,1).getDay(),v=new Date(r,u,0).getDate(),q=Array.from({length:(h+6)%7},()=>null),a=Array.from({length:v},(p,w)=>{const vt=String(w+1).padStart(2,"0");return`${P.value}-${vt}`});return[...q,...a]}),Ie={ko:"ko-KR",en:"en-US",ja:"ja-JP","zh-CN":"zh-CN","zh-TW":"zh-TW",vi:"vi-VN"},pt=b(()=>new Date(P.value+"-01").toLocaleDateString(Ie[ue.value]??"ko-KR",{year:"numeric",month:"long"})),gt=b(()=>[s("host.pgReservations.weekdayMon"),s("host.pgReservations.weekdayTue"),s("host.pgReservations.weekdayWed"),s("host.pgReservations.weekdayThu"),s("host.pgReservations.weekdayFri"),s("host.pgReservations.weekdaySat"),s("host.pgReservations.weekdaySun")]),ht=["ko","ja","zh-CN","zh-TW"];function xt(n){return ht.includes(ue.value)?s("host.pgReservations.calRevenueTenK",{amount:Math.round(n/1e4)}):s("common.currency",{amount:n.toLocaleString()})}return(n,r)=>{const u=Nt,h=Lt,v=Et,q=Tt;return i(),Ct(q,null,{default:Re(()=>[X(u,{show:e(J)&&e(G).length===0},null,8,["show"]),t("div",null,[t("h1",Ot,o(e(s)("host.reservationManage")),1),t("p",It,o(e(s)("host.pgReservations.pageDesc")),1
2)]),t("div",Ut,[t("div",$t,[t("p",Ft,o(e(s)("host.pgReservations.statTotalLabel")),1),t("p",Gt,[M(o(e(W)?.totalCnt??0),1),t("span",Yt,o(e(s)("host.pgReservations.unitCase")),1)])]),t("div",Vt,[t("p",Ht,o(e(s)("host.pgReservations.statTodayLabel")),1),t("p",zt,[M(o(e(W)?.todayCnt??0),1),t("span",Kt,o(e(s)("host.pgReservations.unitCase")),1)])]),t("div",qt,[t("p",Wt,o(e(s)("host.pgReservations.statMonthRevenueLabel")),1),t("p",Xt,o(e(s)("common.currency",{amount:(e(W)?.thisMonthRevenue??0).toLocaleString()})),1)]),t("div",Jt,[t("p",Qt,o(e(s)("host.pgReservations.statCompletedCancelledLabel")),1),t("p",Zt,[t("span",es,o(e(W)?.completedCnt??0),1),r[17]||(r[17]=t("span",{class:"mx-1 text-gray-300"},"/",-1)),t("span",ts,o(e(W)?.cancelledCnt??0),1)])])]),t("div",ss,[t("div",os,[t("button",{type:"button",class:m(["flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-semibold transition-all",e(A)==="list"?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"]),onClick:r[0]||(r[0]=a=>A.value="list")},[r[18]||(r[18]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[t("line",{x1:"8",y1:"6",x2:"21",y2:"6"}),t("line",{x1:"8",y1:"12",x2:"21",y2:"12"}),t("line",{x1:"8",y1:"18",x2:"21",y2:"18"}),t("line",{x1:"3",y1:"6",x2:"3.01",y2:"6"}),t("line",{x1:"3",y1:"12",x2:"3.01",y2:"12"}),t("line",{x1:"3",y1:"18",x2:"3.01",y2:"18"})],-1)),M(" "+o(e(s)("host.pgReservations.viewList")),1)],2),t("button",{type:"button",class:m(["flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-xs font-semibold transition-all",e(A)==="calendar"?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"]),onClick:r[1]||(r[1]=a=>A.value="calendar")},[r[19]||(r[19]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[t("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),t("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),t("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),t("line",{x1:"3",y1:"10",x2:"21",y2:"10"})],-1)),M(" "+o(e(s)("host.pgReservations.viewCalendar")),1)],2)])]),e(A)==="calendar"?(i(),d("div",as,[t("div",ns,[t("button",{type:"button",class:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-gray-100 transition","aria-label":e(s)("host.pgReservations.prevMonthAria"),onClick:rt},[...r[20]||(r[20]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","aria-hidden":"true"},[t("polyline",{points:"15 18 9 12 15 6"})],-1)])],8,rs),t("h3",ls,o(e(pt)),1),t("button",{type:"button",class:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-gray-100 transition","aria-label":e(s)("host.pgReservations.nextMonthAria"),onClick:lt},[...r[21]||(r[21]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","aria-hidden":"true"},[t("polyline",{points:"9 18 15 12 9 6"})],-1)])],8,is)]),t("div",ds,[(i(!0),d(y,null,R(e(gt),a=>(i(),d("div",{key:a,class:"py-2 text-center text-[11px] font-bold text-gray-400"},o(a),1))),128))]),e(_e)?c("",!0):(i(),d("div",cs,[(i(!0),d(y,null,R(e(ut),(a,p)=>(i(),d("div",{key:p,class:m(["border-b border-r border-gray-50 min-h-[80px] p-2 transition-colors",[a?"cursor-pointer hover:bg-wowple-50/30":"",a===e(D)?"bg-wowple-50":""]]),onClick:w=>a&&it(a)},[a?(i(),d(y,{key:0},[t("p",{class:m(["text-xs font-semibold mb-1",new Date(a).getDay()===0?"text-red-400":new Date(a).getDay()===6?"text-blue-400":"text-gray-700"])},o(Number(a.slice(8))),3),(i(!0),d(y,null,R([ct(a)],w=>(i(),d(y,{key:a+"_cd"},[w?(i(),d(y,{key:0},[t("div",ps,[w.pendingCnt>0?(i(),d("div",gs,o(e(s)("host.pgReservations.calPendingLabel",{count:w.pendingCnt})),1)):c("",!0),w.confirmedCnt>0?(i(),d("div",hs,o(e(s)("host.pgReservations.calConfirmedLabel",{count:w.confirmedCnt})),1)):c("",!0),w.completedCnt>0?(i(),d("div",xs,o(e(s)("host.pgReservations.calCompletedLabel",{count:w.completedCnt})),1)):c("",!0)]),w.dayRevenue>0?(i(),d("p",vs,o(xt(w.dayRevenue)),1)):c("",!0)],64)):c("",!0)],64))),128))],64)):c("",!0)],10,us))),128))])),e(D)?(i(),d("div",ys,[t("div",_s,[t("p",bs,o(e(dt)),1),t("span",ms,o(e(s)("host.totalReservations",{count:e(K).length})),1)]),e(be)?(i(),d("div",fs,o(e(s)("common.loading")),1)):e(K).length?(i(),d("div",Rs,[(i(!0),d(y,null,R(e(K),a=>(i(),d("button",{key:a.reservationNo,type:"button",class:m(["flex w-full items-center gap-3 px-5 py-3 text-left hover:bg-gray-50/60 transition",e(k)===a.reservationNo?"bg-wowple-50/40":""]),onClick:p=>ie(a.reservationNo)},[t("div",Cs,[a.startTime?(i(),d(y,{key:0},[t("p",As,o(a.startTime),1),t("p",Ds,"~"+o(a.endTime),1)],64)):(i(),d("p",Ns,"-"))]),t("div",Ls,[t("div",Es,[t("co
2de",Ts,o(a.reservationNo),1),t("span",{class:m(["rounded-full px-2 py-0.5 text-[10px] font-bold",T(S(a)).cls])},o(T(S(a)).label),3),a.partialCancelYn==="Y"&&a.reservationStatus.startsWith("CANCELLED")?(i(),d("span",Ss,o(a.cancelAmt&&a.cancelAmt>0?e(s)("host.pgReservations.partialCancelBadgeAmt",{amount:x(a.cancelAmt)}):e(s)("host.pgReservations.partialCancelBadge")),1)):c("",!0)]),t("p",Ps,o(a.spaceNm||e(s)("host.pgReservations.noSpaceName")),1),t("p",Ms,[M(o(a.bookerNm),1),a.productNm?(i(),d("span",js," · "+o(a.productNm),1)):c("",!0)])]),t("div",Bs,[t("p",Os,o(x(a.payAmt>0?a.payAmt:a.totalAmt)),1),r[22]||(r[22]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5",class:"text-gray-300"},[t("polyline",{points:"9 18 15 12 9 6"})],-1))])],10,ks))),128))])):(i(),d("div",ws,o(e(s)("host.pgReservations.calDateEmptyMsg")),1))])):(i(),d("div",Is,o(e(s)("host.pgReservations.calendarHintMsg")),1))])):c("",!0),e(A)==="list"?(i(),d("div",Us,[t("div",$s,[X(h,{"model-value":e(ae),tabs:e(Pe),"onUpdate:modelValue":Qe},null,8,["model-value","tabs"])]),t("div",Fs,[ke(t("input",{"aria-label":e(s)("host.pgReservations.searchPlaceholder"),"onUpdate:modelValue":r[2]||(r[2]=a=>ee(F)?F.value=a:null),type:"text",placeholder:e(s)("host.pgReservations.searchPlaceholder"),class:"h-inp-sm w-full md:w-44",onKeydown:r[3]||(r[3]=At(a=>E(1),["enter"]))},null,40,Gs),[[Ce,e(F)]]),t("span",Ys,o(e(s)("host.pgReservations.reservationDateLabel")),1),t("div",Vs,[t("div",Hs,[X(v,{modelValue:e(U),"onUpdate:modelValue":r[4]||(r[4]=a=>ee(U)?U.value=a:null),"full-label":"",clearable:"","min-date":"2000-01-01","max-date":e($)||void 0},null,8,["modelValue","max-date"])]),r[23]||(r[23]=t("span",{class:"shrink-0 text-gray-400 text-sm"},"~",-1)),t("div",zs,[X(v,{modelValue:e($),"onUpdate:modelValue":r[5]||(r[5]=a=>ee($)?$.value=a:null),"full-label":"",clearable:"","min-date":e(U)||"2000-01-01"},null,8,["modelValue","min-date"])])]),t("div",Ks,[t("button",{type:"button",class:"flex-1 rounded-xl bg-wowple-500 px-4 py-2.5 text-sm font-semibold text-white hover:bg-wowple-600 transition md:flex-none",onClick:r[6]||(r[6]=a=>E(1))},o(e(s)("host.pgReservations.searchBtn")),1),e(U)||e($)||e(F)?(i(),d("button",{key:0,type:"button",class:"rounded-xl border border-gray-200 px-3 py-2.5 text-sm text-gray-500 hover:bg-gray-50 transition",onClick:r[7]||(r[7]=a=>{U.value="",$.value="",F.value="",E(1)})},o(e(s)("host.pgReservations.resetBtn")),1)):c("",!0),t("span",qs,o(e(s)("host.totalReservations",{count:e(Ee).toLocaleString()})),1),t("button",{type:"button",class:"flex items-center gap-1.5 rounded-xl border border-gray-200 bg-white px-3 py-2.5 text-xs font-semibold text-gray-600 hover:bg-gray-50 transition ml-auto",onClick:at},[r[24]||(r[24]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3"})],-1)),M(" "+o(e(s)("host.pgReservations.excelButtonLabel",{count:e(G).length})),1)])]),t("span",Ws,o(e(s)("host.totalReservations",{count:e(Ee).toLocaleString()})),1)]),!e(J)&&!e(G).length?(i(),d("div",Xs,[r[25]||(r[25]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",class:"text-gray-200"},[t("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),t("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),t("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),t("line",{x1:"3",y1:"10",x2:"21",y2:"10"})],-1)),t("p",Js,o(e(s)("host.pgReservations.emptyListMsg")),1)])):(i(),d(y,{key:1},[t("div",Qs,[(i(!0),d(y,null,R(e(G),a=>(i(),d("div",{key:a.reservationNo,class:m(["flex items-start justify-between p-4 rounded-2xl bg-white border border-gray-100 shadow-[0_1px_4px_rgba(0,0,0,0.06)] active:bg-gray-50 transition cursor-pointer",e(k)===a.reservationNo?"border-wowple-200 bg-wowple-50/40":""]),onClick:p=>ie(a.reservationNo)}
2,[t("div",eo,[t("div",to,[t("code",so,o(a.reservationNo),1),t("span",{class:m(["rounded-full px-2 py-0.5 text-[10px] font-bold",T(S(a)).cls])},o(T(S(a)).label),3),a.partialCancelYn==="Y"&&a.reservationStatus.startsWith("CANCELLED")?(i(),d("span",oo,o(a.cancelAmt&&a.cancelAmt>0?e(s)("host.pgReservations.partialCancelBadgeAmt",{amount:x(a.cancelAmt)}):e(s)("host.pgReservations.partialCancelBadge")),1)):c("",!0)]),t("p",ao,o(a.spaceNm||e(s)("host.pgReservations.noSpaceName")),1),t("p",no,o(a.bookerNm)+" · "+o(a.reservationDay),1),a.startTime?(i(),d("p",ro,o(a.startTime)+" ~ "+o(a.endTime),1)):c("",!0)]),t("div",lo,[t("p",io,o(x(a.payAmt>0?a.payAmt:a.totalAmt)),1),r[26]||(r[26]=t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5",class:"inline mt-1 text-gray-300"},[t("polyline",{points:"9 18 15 12 9 6"})],-1))])],10,Zs))),128))]),t("div",co,[t("table",uo,[t("thead",null,[t("tr",po,[t("th",go,o(e(s)("host.reservationId")),1),t("th",ho,o(e(s)("host.pgReservations.thSpaceProduct")),1),t("th",xo,o(e(s)("host.guest")),1),t("th",vo,o(e(s)("host.date")),1),t("th",yo,o(e(s)("host.amount")),1),t("th",_o,o(e(s)("host.statusLabel")),1),t("th",bo,o(e(s)("host.pgReservations.thDetail")),1)])]),t("tbody",mo,[(i(!0),d(y,null,R(e(G),a=>(i(),d("tr",{key:a.reservationNo,class:m(["hover:bg-gray-50/60 transition-colors cursor-pointer",e(k)===a.reservationNo?"bg-wowple-50/40":""]),onClick:p=>ie(a.reservationNo)},[t("td",wo,o(a.reservationNo),1),t("td",Ro,[t("p",ko,o(a.spaceNm||"-"),1),t("p",Co,o(a.productNm||a.branchNm),1)]),t("td",Ao,[t("p",Do,o(a.bookerNm),1),t("p",No,o(a.bookerMobile),1)]),t("td",Lo,[t("p",Eo,o(a.reservationDay),1),a.startTime?(i(),d("p",To,o(a.startTime)+" ~ "+o(a.endTime),1)):c("",!0)]),t("td",So,o(x(a.payAmt>0?a.payAmt:a.totalAmt)),1),t("td",Po,[t("span",{class:m(["rounded-full px-2.5 py-1 text-[11px] font-bold whitespace-nowrap",T(S(a)).cls])},o(T(S(a)).label),3),a.partialCancelYn==="Y"&&a.reservationStatus.startsWith("CANCELLED")?(i(),d("span",Mo,o(a.cancelAmt&&a.cancelAmt>0?e(s)("host.pgReservations.partialCancelBadgeAmt",{amount:x(a.cancelAmt)}):e(s)("host.pgReservations.partialCancelBadge")),1)):c("",!0)]),r[27]||(r[27]=t("td",{class:"py-3.5 px-4 text-center"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5",class:"inline text-gray-300"},[t("polyline",{points:"9 18 15 12 9 6"})])],-1))],10,fo))),128))])])]),e(O)>1?(i(),d("div",jo,[t("button",{type:"button",class:"flex h-8 w-8 items-center justify-center rounded-lg border border-gray-200 text-gray-500 hover:bg-gray-50 transition disabled:opacity-40 disabled:cursor-not-allowed",disabled:e(B)<=1,onClick:r[8]||(r[8]=a=>Z(e(B)-1))},[...r[28]||(r[28]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[t("polyline",{points:"15 18 9 12 15 6"})],-1)])],8,Bo),(e(Y)[0]??1)>1?(i(),d(y,{key:0},[t("button",{type:"button",class:"flex h-8 w-8 items-center justify-center rounded-lg text-sm font-semibold text-gray-600 hover:bg-gray-50 transition",onClick:r[9]||(r[9]=a=>Z(1))},"1"),(e(Y)[0]??1)>2?(i(),d("span",Oo,"···")):c("",!0)],64)):c("",!0),(i(!0),d(y,null,R(e(Y),a=>(i(),d("button",{key:a,type:"button",class:m(["flex h-8 w-8 items-center justify-center rounded-lg text-sm font-semibold transition",a===e(B)?"bg-wowple-500 text-white shadow-sm shadow-wowple-200":"text-gray-600 hover:bg-gray-50"]),onClick:p=>Z(a)},o(a),11,Io))),128)),(e(Y)[e(Y).length-1]??0)<e(O)?(i(),d(y,{key:1},[(e(Y)[e(Y).length-1]??0)<e(O)-1?(i(),d("span",Uo,"···")):c("",!0),t("button",{type:"button",class:"flex h-8 w-8 items-center justify-center rounded-lg text-sm font-semibold text-gray-600 hover:bg-gray-50 transition",onClick:r[10]||(r[10]=a=>Z(e(O)))},o(e(O)),1)],64)):c("",!0),t("button",{type:"button",class:"flex h-8 w-8 items-center justify-center rounded-lg border border-gray-200 text-gray-500 hover:bg-gray-50 transition disabled:opacity-40 disabled:cursor-not-allowed",disabled:e(B)>
2=e(O),onClick:r[11]||(r[11]=a=>Z(e(B)+1))},[...r[29]||(r[29]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[t("polyline",{points:"9 18 15 12 9 6"})],-1)])],8,$o)])):c("",!0)],64))])):c("",!0),X(Ue,{name:"drawer"},{default:Re(()=>[e(k)?(i(),d("div",Fo,[t("div",Go,[t("div",Yo,[t("p",Vo,o(e(s)("host.pgReservations.detailTitle")),1),t("code",Ho,o(e(k)),1)]),t("button",{"aria-label":e(s)("host.pgReservations.closeBtn"),type:"button",class:"flex h-8 w-8 items-center justify-center rounded-full text-gray-400 hover:bg-gray-100 transition",onClick:ve},[...r[30]||(r[30]=[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5","stroke-linecap":"round","stroke-linejoin":"round"},[t("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),t("line",{x1:"6",y1:"6",x2:"18",y2:"18"})],-1)])],8,zo)]),!e(he)&&e(l)?(i(),d("div",Ko,[t("div",qo,[t("div",Wo,[t("span",{class:m(["rounded-full px-3 py-1.5 text-xs font-bold",T(S(e(l))).cls])},o(T(S(e(l))).label),3),e(l).partialCancelYn==="Y"&&e(l).reservationStatus.startsWith("CANCELLED")?(i(),d("span",Xo,o(e(l).cancelAmt>0?e(s)("host.pgReservations.partialCancelBadgeAmt",{amount:x(e(l).cancelAmt)}):e(s)("host.pgReservations.partialCancelBadge")),1)):c("",!0),e(l).bookingType?(i(),d("span",Jo,o(e(Je)[e(l).bookingType]||e(l).bookingType),1)):c("",!0)]),t("div",Qo,[t("p",Zo,o(e(s)("host.pgReservations.sectionSpaceProductLabel")),1),t("p",ea,o(e(l).branchNm),1),t("p",ta,o(e(l).spaceNm),1),t("p",sa,o(e(l).productNm),1)]),t("div",oa,[t("p",aa,o(e(s)("host.pgReservations.sectionUsageDateTimeLabel")),1),t("div",na,[r[31]||(r[31]=t("div",{class:"flex h-10 w-10 items-center justify-center rounded-xl bg-wowple-50 shrink-0"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"text-wowple-500"},[t("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),t("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),t("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),t("line",{x1:"3",y1:"10",x2:"21",y2:"10"})])],-1)),t("div",null,[t("p",ra,o(e(l).reservationDay),1),t("p",la,o(e(l).startTime)+" ~ "+o(e(l).endTime)+" · "+o(e(s)("host.pgReservations.personCountLabel",{count:e(l).guestCnt})),1)])])]),t("div",ia,[t("p",da,o(e(s)("host.guest")),1),t("div",ca,[t("div",ua,[t("span",pa,o(e(s)("host.pgReservations.bookerNameLabel")),1),t("span",ga,o(e(l).bookerNm),1)]),t("div",ha,[t("span",xa,o(e(s)("host.pgReservations.contactLabel")),1),t("a",{href:`tel:${e(l).bookerMobile}`,class:"font-semibold text-wowple-600 hover:underline"},o(("maskMobile"in n?n.maskMobile:e(Bt))(e(l).bookerMobile)),9,va)]),e(l).request?(i(),d("div",ya,[t("p",_a,o(e(s)("host.pgReservations.requestLabel")),1),t("p",ba,o(e(l).request),1)])):c("",!0)])]),t("div",ma,[t("p",fa,o(e(s)("host.pgReservations.amountDetailsTitle")),1),t("div",wa,[t("div",Ra,[t("span",ka,o(e(s)("host.pgReservations.goodsAmountLabel")),1),t("span",Ca,o(x(e(l).goodsAmt)),1)]),e(l).optionAmt>0?(i(),d("div",Aa,[t("span",Da,o(e(s)("host.pgReservations.optionAmountLabel")),1),t("span",Na,o(x(e(l).optionAmt)),1)])):c("",!0),e(l).discountAmt>0?(i(),d("div",La,[t("span",Ea,o(e(s)("host.pgReservations.discountAmountLabel")),1),t("span",Ta,"-"+o(x(e(l).discountAmt)),1)])):c("",!0),t("div",Sa,[t("span",Pa,o(e(s)("host.pgReservations.totalLabel")),1),t("span",Ma,o(x(e(l).totalAmt)),1)])]),e(l).options?.length?(i(),d("div",ja,[t("p",Ba,o(e(s)("host.pgReservations.addonOptionsTitle")),1),(i(!0),d(y,null,R(e(l).options,a=>(i(),d("div",{key:a.optionSeq,class:"flex justify-between text-xs text-gray-600"},[t("span",null,o(a.optionNm)+" × "+o(a.optionCnt),1),t("span",null,o(x(a.optionAmt)),1)]))),128))])):c("",!0)]),t("div",Oa,[t("p",Ia,o(e(s)("host.pgReservations.paymentInfoTitle")),1),t("div",Ua,[t("div",$a,[t("span",Fa,o(e(s)("host.payMethod")),1),t("span",Ga,o(e(l).paymentType==="REALTIME"?e(s)("host.pgReservations.paymentTypeRealtime"):e(s)("host.pgReservations.paymentTypeHost")),1)]),e(l).payDiv?(i(),d("div",Ya,[t("span",Va,o(e(s)("host.pgReservations.payDivLabel")),1),t("span",Ha,o(e(l).payDiv==="ONLINE"?e(s)("host.pgReservations.payDivOnline"):e(l).payDiv==="ONSITE"?e(s)("host.pgReservations.payDivOnsite"):e(s)("host.pgReservations.payDivNone")),1)])):c("",!0),e(l).payMeans?(i(),d("div",za,[t("span",Ka,o(e(s)("host.pgReservations.payMeansLabel")),1),t("span",qa,o(e(l).payMeans==="CARD"?e(s)("host.pgReservations.payMeansCard"):e(s)("host.pgReservations.payMeansTransfer")),1)])):c("",!0),e(l).payDate?(i(),d("div",Wa,[t("span",Xa,o(e(s)("host.pgReservations.payDateLabel")),1),t("span",Ja,o(e(l).payDate),1)])):c("",!0),t("div",Qa,[t("span",Za,o(e(s)("host.pgReservations.payAmountLabel")),1),t("span",en,o(x(e(l).payAmt)),1)])])]),e(nt)&&e(l).cancelDate?(i(),d("div",tn,[t("p",sn,[M(o(e(s)("host.pgReservations.cancelInfoTitle"))+" ",1),e(l).partialCancelYn==="Y"?(i(),d("span",on,o(e(s)("host.pgReservations.refundPartialBadge")),1)):c("",!0)]),t("div",an,[t("div",nn,[t("span",rn,o(e(s)("host.pgReservations.cancelDateLabel")),1),t("span",ln,o(e(l).cancelDate),1)]),e(l).cancelReason?(i(),d("div",dn,[t("span",cn,o(e(s)("host.pgReservations.cancelReasonLabel")),1),t("span",un,o(e(Se).find(a=>a.v===e(l).cancelReason)?.l||e(Te)[e(l).cancelReason]||e(l).cancelReason),1)])):c("",!0),e(l).cancelAmt>0?(i(),d("div",pn,[t("span",gn,o(e(s)("host.pgReservations.refundAmountLabel")),1),t("span",hn,o(x(e(l).cancelAmt)),1)])):c("",!0),e(l).payAmt>0?(i(),d("div",xn,[t("span",vn,o(e(s)("host.pgReservations.penaltyLabel")),1),t("span",yn,o(x(e(l).payAmt-e(l).cancelAmt)),1)])):c("",!0)])])):c("",!0),e(l).adjustAmt>0||e(l).adjustExpectedDay?(i(),d("div",_n,[t("p",bn,o(e(s)("host.settlementInfo")),1),t("div",mn,[e(l).adjustExpectedDay?(i(),d("div",fn,[t("span",wn,o(e(s)("host.pgReservations.settleDueDateLabel")),1),t("span",Rn,o(e(l).adjustExpectedDay),1)])):c("",!0),t("div",kn,[t("span",Cn,o(e(s)("host.pgReservations.settleAmountLabel")),1),t("span",An,o(x(e(l).adjustAmt)),1)]),e(l).adjustNo?(i(),d("div",Dn,[t("span",Nn,o(e(s)("host.pgReservations.settleNoLabel")),1),t("code",Ln,o(e(l).adjustNo),1)])):c("",!0)])])):c("",!0),t("div",En,[t("div",Tn,[t("p",Sn,o(e(s)("host.pgReservations.memoSectionTitle")),1),e(V)?c("",!0):(i(),d("button",{key:0,t
2ype:"button",class:"text-xs text-wowple-600 hover:underline font-semibold",onClick:r[12]||(r[12]=a=>{V.value=!0,H.value=e(l).memo??""})},o(e(l).memo?e(s)("host.modifyAction"):e(s)("host.pgReservations.addAction")),1))]),e(V)?(i(),d("div",Pn,[ke(t("textarea",{"aria-label":e(s)("host.pgReservations.memoPlaceholder"),"onUpdate:modelValue":r[13]||(r[13]=a=>ee(H)?H.value=a:null),rows:"3",placeholder:e(s)("host.pgReservations.memoPlaceholder"),class:"h-inp-sm resize-none"},null,8,Mn),[[Ce,e(H)]]),t("div",jn,[t("button",{type:"button",class:"rounded-lg border border-gray-200 px-3 py-1.5 text-xs font-semibold text-gray-600 hover:bg-gray-50 transition",onClick:r[14]||(r[14]=a=>V.value=!1)},o(e(s)("host.cancel")),1),t("button",{type:"button",disabled:e(ne),class:"rounded-lg bg-wowple-500 px-3 py-1.5 text-xs font-semibold text-white hover:bg-wowple-600 transition disabled:opacity-60",onClick:ot},o(e(ne)?e(s)("host.pgReservations.saving"):e(s)("host.save")),9,Bn)])])):(i(),d("p",On,o(e(l).memo||e(s)("host.pgReservations.noMemoMsg")),1))]),t("p",In,o(e(s)("host.pgReservations.regDateLabel",{date:e(l).regDate})),1)])])):c("",!0),e(l)&&e(je).length&&!e(N)?(i(),d("div",Un,[(i(!0),d(y,null,R(e(je),a=>(i(),d("button",{key:a.label,type:"button",disabled:e(C),class:m(["flex-1 rounded-xl py-3 text-sm font-bold transition-all disabled:opacity-50",a.cls]),onClick:p=>a.cancel?We():a.onsite?tt():et(a.status,a.label)},o(e(C)?e(s)("host.pgReservations.actionProcessing"):a.label),11,$n))),128))])):c("",!0),e(l)&&e(N)?(i(),d("div",Fn,[t("div",null,[t("p",Gn,o(e(l).reservationStatus==="PENDING_APPROVAL"?e(s)("host.pgReservations.rejectPanelTitle"):e(s)("host.pgReservations.cancelPanelTitle")),1),t("p",Yn,o(e(l).reservationStatus==="PENDING_APPROVAL"?e(s)("host.pgReservations.rejectReasonTitle"):e(s)("host.pgReservations.selectCancelReasonTitle")),1)]),e(Q)&&e(re)?(i(),d("div",Vn,[...r[32]||(r[32]=[t("div",{class:"h-5 w-5 animate-spin rounded-full border-2 border-red-300 border-t-transparent"},null,-1)])])):e(Q)&&e(_)?(i(),d(y,{key:1},[t("div",Hn,[t("p",zn,o(e(s)("host.pgReservations.refundPolicyTitle")),1),e(_).rules.length?(i(),d("div",Kn,[(i(!0),d(y,null,R(e(_).rules,(a,p)=>(i(),d("div",{key:p,class:m(["flex justify-between text-xs rounded px-1.5 py-0.5",p===e(qe)?"bg-red-50 text-red-600 font-bold":"text-gray-500"])},[t("span",null,o(a.dayBefore===0?e(s)("host.pgReservations.refundRuleSameDay"):e(s)("host.pgReservations.refundRuleDayBefore",{day:a.dayBefore})),1),t("span",null,o(e(s)("host.pgReservations.refundRuleRate",{rate:a.refundRate})),1)],2))),128))])):(i(),d("p",qn,o(e(s)("host.pgReservations.refundNoRules")),1))]),t("div",Wn,[t("div",Xn,[t("span",Jn,o(e(s)("host.pgReservations.refundPayAmt")),1),t("span",Qn,o(x(e(_).payAmt)),1)]),t("div",Zn,[t("span",er,o(e(s)("host.pgReservations.refundDday")),1),t("span",tr,[M(" D-"+o(e(_).useBeforeDay)+" ",1),e(_).sameDayAsPayment?(i(),d("span",sr,"("+o(e(s)("host.pgReservations.refundSameDayNote"))+")",1)):c("",!0)])]),t("div",or,[t("span",ar,o(e(s)("host.pgReservations.refundAppliedRate")),1),t("span",nr,o(e(_).refundRate)+"%",1)]),e(_).bankFeeAmt>0?(i(),d("div",rr,[t("span",lr,o(e(s)("host.pgReservations.refundBankFee")),1),t("span",ir,"-"+o(x(e(_).bankFeeAmt)),1)])):c("",!0)]),e(_).hasPgTno?c("",!0):(i(),d("p",dr,o(e(s)("host.pgReservations.refundNoPgWarn")),1)),t("div",cr,[(i(),d(y,null,R(["POLICY","FULL","CUSTOM"],a=>t("button",{key:a,type:"button",class:m(["rounded-lg border px-2 py-2 text-xs font-semibold transition-all",e(L)===a?"border-red-400 bg-red-100 text-red-700":"border-gray-200 bg-white text-gray-600 hover:border-red-200"]),onClick:p=>L.value=a},o(a==="POLICY"?e(s)("host.pgReservations.refundTypePolicy"):a==="FULL"?e(s)("host.pgReservations.refundTypeFull"):e(s)("host.pgReservations.refundTypeCustom")),11,ur)),64))]),e(L)==="CUSTOM"?(i(),d("div",pr,[ke(t("input",{"onUpdate:modelValue":r[15]||(r[15]=a=>ee(z)?z.value=a:null),type:"number",min:"0",max:e(_).payAmt,step:"100",placeholder:e(s)("host.pgReservations.refundCustomPlaceholder"),"aria-label":e(s)("host.pgReservations.refundCustomPlaceholder"),class:"h-in
2p-sm flex-1 text-right"},null,8,gr),[[Ce,e(z),void 0,{number:!0}]]),t("span",hr,"/ "+o(x(e(_).payAmt)),1)])):c("",!0),t("div",xr,[t("span",vr,o(e(s)("host.pgReservations.refundExpected")),1),t("span",yr,[M(o(x(e(le)))+" ",1),e(le)>0&&e(le)<e(_).payAmt?(i(),d("span",_r,o(e(s)("host.pgReservations.refundPartialBadge")),1)):c("",!0)])])],64)):c("",!0),t("div",br,[(i(!0),d(y,null,R(e(Se),a=>(i(),d("button",{key:a.v,type:"button",class:m(["rounded-lg border px-3 py-2 text-[13px] font-semibold transition-all",e(I)===a.v?"border-red-400 bg-red-50 text-red-600":"border-gray-200 bg-white text-gray-600 hover:border-red-200"]),onClick:p=>I.value=a.v},o(a.l),11,mr))),128))]),t("div",fr,[t("button",{type:"button",class:"flex-1 rounded-xl border border-gray-200 py-3 text-sm font-semibold text-gray-600 hover:bg-gray-50 transition",onClick:r[16]||(r[16]=a=>{N.value=!1,I.value=""})},o(e(s)("host.pgReservations.panelBackBtn")),1),t("button",{type:"button",disabled:!e(I)||e(C)||e(Q)&&e(re),class:"flex-1 rounded-xl bg-red-500 py-3 text-sm font-bold text-white hover:bg-red-600 transition disabled:opacity-50",onClick:st},o(e(C)?e(s)("host.pgReservations.actionProcessing"):e(l).reservationStatus==="PENDING_APPROVAL"?e(s)("host.pgReservations.rejectConfirmBtn"):e(s)("host.pgReservations.cancelConfirmBtn")),9,wr)])])):c("",!0)])):c("",!0)]),_:1}),X(Ue,{name:"fade"},{default:Re(()=>[e(k)?(i(),d("div",{key:0,class:"fixed inset-0 z-[59] bg-black/40",onClick:ve})):c("",!0)]),_:1})]),_:1})}}}),Mr=Dt(kr,[["__scopeId","data-v-55895a78"]]);export{Mr 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.