PageSourceSearch

https://solvook.com/_next/static/chunks/pages/mypage/passes-4b3b0aaf1c5642a9.js

js solvook.com collected 2026-10-09 02:02:07 UTC 25,417 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1708],{83821:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mypage/passes",function(){return a(24379)}])},53424:function(e,t,a){"use strict";a.d(t,{Bb:function(){return h},HO:function(){return g},I8:function(){return j},J7:function(){return r},MI:function(){return T},PO:function(){return P},QL:function(){return f},RL:function(){return M},S$:function(){return w},Us:function(){return d},bN:function(){return N},eZ:function(){return i},no:function(){return x},qG:function(){return m},qY:function(){return z},rn:function(){return C},uq:function(){return y},ut:function(){return k},vh:function(){return Z},zY:function(){return p}});var l,s,n,r,i,o,c=a(47631),u=a(14280);let d={view3minute:"view_3minute",print:"print",download:"download"},m={handout:"handout",studio:"studioHandout"};(l=r||(r={})).Solvookplus="solvookplus",l.Ticket="ticket",l.Subscription="solvookplus-subscribe",l.Expert="expert",l.ExpertSubscription="expert-subscribe",l.Package="package",l.FreePass="freepass",l.Cash="cash";let x={expert:"엑스퍼트",freepass:"프리패스",ticket:"자료 이용권"},p={GRADE1:"고1",GRADE23:"고2∙3"},h={GRADE1:"고1",GRADE23:"고2\xb73"},v={GRADE1:"1",GRADE23:"23"},f=e=>"GRADE1"===e||"GRADE23"===e,b=e=>(null!=e?e:"").replace(/[^0-9]/g,""),g=(e,t)=>{if("middle"===t)return"GRADE1";if("univ"===t)return"GRADE23";switch(b(null==e?null:String(e))){case"10":return"GRADE1";case"20":case"30":return"GRADE23";default:return null}},j=(e,t)=>{let a=b(e);return!a||a===v[t]};(s=i||(i={})).COUNT="count",s.AMOUNT="amount",(n=o||(o={})).SUBJECT="이용가능 과목 조건 불일치",n.PUBLISHER="이용가능 출판사 조건 불일치",n.CURRICULUM="이용가능 교육과정 조건 불일치",n.AUTHOR="이용가능 저자 조건 불일치",n.PRODUCT_TYPE="이용가능 상품 유형 조건 불일치",n.PRICE="이용가능 가격 조건 불일치";let y=async e=>{let{data:t}=await c.ah.market.post("/membership-use-logs",{...e});return t},N=async e=>{let{data:t}=await c.ah.market("/memberships/products".concat((0,u.hu)(e)));return t},w=async e=>{let{data:t}=await c.ah.market("/memberships/products/".concat(e));return t},k=async e=>{let{data:t}=await c.ah.market.get("/memberships",{params:e});return t},C=async e=>{let{data:t}=await c.ah.market.patch("/memberships/tickets",e);return t},P=async e=>{let{data:t}=await c.ah.market.post("/memberships/subscription",e);return t},Z=async()=>{let{data:e}=await c.ah.market.get("/memberships/subscription/cancel");return e},T=async e=>{let{data:t}=await c.ah.market("/main/products".concat((0,u.hu)(e)));return t},z=async()=>{let{data:e}=await c.ah.market("/plans");return e},M=async e=>{let{data:t}=await c.ah.market("/plans/".concat(e));return t}},88729:function(e,t,a){"use strict";a.d(t,{c:function(){return i},u:function(){return r}});var l=a(40070),s=a(53424),n=a(13263);let r=e=>e.includes(s.J7.Expert),i=e=>{var t,a,r,i,o,c,u,d,m;switch(e.category){case s.J7.Ticket:return[{type:"과목",value:null!==(t=e.subject)&&void 0!==t?t:n.uD[e.subjectCode]},{type:"과정",value:e.availableCurriculumNames},{type:"제외 저자",value:null!==(a=e.unavailableAuthorNames)&&void 0!==a?a:""},{type:"출판사",value:null!==(r=e.availablePublisherNames)&&void 0!==r?r:""},{type:"가격",value:"count"===e.deductionMethod?"".concat((0,l.V2)(e.availableMinPrice),"원~\n								").concat((0,l.V2)(e.availableMaxPrice),"원 사이"):""},{type:"상품종류",value:n.$Q.handout}];case s.J7.Expert:return[{type:"과목",value:null!==(i=e.subject)&&void 0!==i?i:n.uD[e.subjectCode]},{type:"상품종류",value:"엑스퍼트"}];case s.J7.FreePass:return[{type:"과목",value:null!==(o=e.subject)&&void 0!==o?o:n.uD[e.subjectCode]},{type:"과정",value:e.availableCurriculumNames},{type:"가능저자",value:null!==(c=e.availableAuthorNames)&&void 0!==c?c:""},{type:"출판사",value:e.availablePublisherNames},{type:"상품종류",value:n.$Q.handout}];default:return[{type:"과목",value:null!==(u=e.subject)&&void 0!==u?u:n.uD[e.subjectCode]},{type:"과정",value:e.availableCurriculumNames},{type:"제외 저자",value:null!==(d=e.unavailableAuthorNames)&&void 0!==d?d:""},{type:"출판사",value:null!==(m=e.availablePublisherNames)&&void 0!==m?m:""},{type:"가격",value:"count"===e.deductionMethod?"".concat((0,l.V2)(e.availableMinPrice),"원~\n								").concat((0,l.V2)(e.availableMaxPrice),"원 사이"):""},{type:"상품종류",value:n.$Q.handout}]}}},22773:function(e,t,a){"use strict";var l=a(85893),s=a(32113);let n=e=>{let{page:t,totalCount:a,pageSize:n,onChange:r}=e,i=Math.ceil(a/n);if(i<=1)return null;let o=e=>{r(e),window.scrollTo({top:0,behavior:"smooth"})};return(0,l.jsx)("div",{className:"flex justify-center py-6",children:(0,l.jsx)(s.tl,{totalPages:i,currentPage:t,onPageChange:o,shape:"rounded",size:"md",arrow:!0})})};t.Z=n},54741:function(e,t,a){"use strict";
1var l=a(85893),s=a(13343),n=a(77313),r=a(96040),i=a(49850),o=a(40070),c=a(32113),u=a(11163),d=a(8924);let m=e=>{let{title:t,showBack:a=!0,showPcBack:m=!1,showHeaderBorder:x=!0,onBack:p,rightAction:h,children:v}=e,f=(0,u.useRouter)(),{items:b,activeKey:g}=(0,i.h)(),j=null!=p?p:()=>f.back();return(0,l.jsxs)("div",{className:"flex min-h-screen flex-col bg-gray-50",children:[(0,l.jsx)("div",{className:"sticky top-0 z-[800] hidden lg:block",children:(0,l.jsx)(n.Z,{})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsxs)("header",{className:(0,o.cn)("sticky top-0 z-[800] flex h-[52px] items-center gap-3 bg-white px-5 lg:hidden",x&&"border-b border-gray-50"),children:[a&&(0,l.jsx)("button",{type:"button","aria-label":"뒤로가기",onClick:j,className:"shrink-0",children:(0,l.jsx)(c.ZZ.ArrowLeft,{size:"md",className:"text-gray-700"})}),(0,l.jsx)(c.ZT,{variant:"subtitle1",className:"text-strong flex-1",children:t}),h]}),(0,l.jsxs)(d.Z,{children:[(0,l.jsxs)("div",{className:"hidden pt-8 lg:mb-5 lg:flex lg:items-center lg:gap-3",children:[m&&(0,l.jsx)("button",{type:"button","aria-label":"뒤로가기",onClick:j,className:"shrink-0",children:(0,l.jsx)(c.ZZ.ChevronLeft,{size:"md",className:"text-gray-700"})}),(0,l.jsx)(c.ZT,{variant:"h5",className:"text-strong",children:t})]}),v]})]}),(0,l.jsx)(r.Z,{}),(0,l.jsx)(s.ZP,{items:b,activeKey:g})]})};t.Z=m},77099:function(e,t,a){"use strict";a.d(t,{Z:function(){return d}});var l=a(85893),s=a(32113),n=a(27484),r=a.n(n);let i=(e,t)=>{let a=r()(t).diff(e,"day");if(a<=0)return 0;let l=r()().diff(e,"day");return Math.min(100,Math.max(0,l/a*100))};var o=a(67294);let c=e=>{let{description:t,onOpenChange:a}=e,[n,r]=(0,o.useState)(!1),i=e=>{r(e),null==a||a(e)};return(0,l.jsx)(s.u,{open:n,onOpenChange:i,description:t,side:"bottom",showArrow:!0,align:"start",sideOffset:-10,bold:!0,size:"sm",children:(0,l.jsxs)("button",{type:"button",onClick:()=>i(!n),className:"flex items-center gap-1",children:[(0,l.jsx)(s.ZT,{variant:"subtitle2",className:"text-secondary",children:"사용 대기"}),(0,l.jsx)(s.ZZ.InfoCircle,{size:"xxs",className:"text-secondary"})]})})},u=e=>{let{startDate:t,endDate:a,remainDay:n,isPending:o,pendingDescription:u,onPendingTooltipOpenChange:d}=e,m=i(t,a);return(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)("div",{className:"h-2 w-full overflow-hidden rounded-full bg-gray-50",children:!o&&(0,l.jsx)("div",{className:"h-full rounded-full bg-blue-400",style:{width:"".concat(m,"%")}})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[o?(0,l.jsx)(c,{description:u,onOpenChange:d}):(0,l.jsxs)(s.ZT,{variant:"subtitle2",className:"text-secondary-main",children:[n,"일 남음"]}),(0,l.jsxs)(s.ZT,{variant:"body2",className:"text-secondary",children:[r()(t).format("YY.MM.DD")," ~ ",r()(a).format("YY.MM.DD"),"까지"]})]})]})};var d=u},91582:function(e,t,a){"use strict";a.d(t,{RO:function(){return r},UB:function(){return n},e8:function(){return s}});var l=a(53424);let s=10,n={[l.J7.Expert]:"mint",[l.J7.Ticket]:"blue",[l.J7.FreePass]:"indigo"},r={[l.J7.Ticket]:"/static/assets/default-image/ticket.svg",[l.J7.FreePass]:"/static/assets/default-image/freepass.svg",[l.J7.Expert]:"/static/assets/default-image/expert.svg"}},24334:function(e,t,a){"use strict";var l=a(85893),s=a(40070),n=a(32113),r=a(67294);let i="text-base leading-[1.5] tracking-[-0.16px]",o={sm:"w-[100px]",md:"w-[140px]"},c=e=>{let{children:t}=e;return(0,l.jsx)(n.ZT,{variant:"subtitle1",as:"p",className:"mb-3 text-gray-700",children:t})},u=e=>{let{tone:t,children:a}=e;return"strong"===t?(0,l.jsx)("b",{className:"text-blue-500",children:a}):"highlight"===t?(0,l.jsx)(n.ZT,{variant:"subtitle1",as:"span",className:"text-indigo-500",children:a}):(0,l.jsx)(l.Fragment,{children:a})},d=e=>{var t;let{row:a}=e,n=null!==(t=a.tone)&&void 0!==t?t:"default";return(0,l.jsxs)("dl",{className:(0,s.cn)("mb-1 flex flex-wrap"),children:[a.label&&(0,l.jsx)("dt",{className:(0,s.cn)(i,"text-gray-500"),children:(0,l.jsxs)(u,{tone:n,children:[a.indent&&(0,l.jsx)("span",{"aria-hidden":"true",children:"ㄴ "}),a.label," :"," "]})}),(0,l.jsxs)("dd",{className:(0,s.cn)(i,"text-gray-500",a.label&&"ml-1"),children:[(0,l.jsx)(u,{tone:n,children:a.value}),a.suffix]})]})},m=e=>{var t;let{row:a,labelWidth:r}=e,c=null!==(t=a.tone)&&void 0!==t?t:"default";return(0,l.jsxs)("dl",{className:(0,s.cn)("flex flex-wrap",r?"mb-1":"mb-2"),children:[(0,l.jsx)("dt",{className:(0,s.cn)(i,"text-gray-300",r&&o[r]),children:(0,l.jsxs)(n.ZT,{variant:"body1",className:"text-secondary",children:[a.label,!r&&" : "]})}),(0,l.jsx)("dd",{className:(0,s.cn)("flex flex-1",i,"text-gray-700",!r&&"ml-1"),children:(0,l.jsxs)(n.ZT,{variant:"body1",children:[(0,l.jsx)(n.ZT,{variant:"default"!==c?"subtitle1":"body1",as:"span",className:(0,s.cn)("default"===c&&"text-primary","success"===c&&"text-status-data","error"===c&&"text-status-error"),children:a.value}),a.suffix]})})]})},x=e=>{let{section:t}=e;return"inline"===t.layout?(0,l.jsx)("div",{children:t.rows.map((e,a)=>(0,l.jsx)(d,{row:e},"".concat(t.id,"-").concat(a)))}):"table"===t.layout?(0,l.jsxs)("div",{children:[(0,l.jsx)(c,{children:t.title}),t.rows.map((e,a)=>(0,l.jsx)(m,{row:e,labelWidth:t.labelWidth},"".concat(t.id,"-").concat(a)))]}):(0,l.jsxs)("div",{children:[(0,l.jsx)(c,{children:t.title}),(0,l.jsx)("ul",{children:t.items.map((e,a)=>(0,l.jsxs)("li",{className:(0,s.cn)(i,"mb-1 whitespace-break-spaces text-gray-500 max-sm:text-sm"),children:[e,"\xa0"]},"".concat(t.id,"-").concat(a)))})]})},p=e=>{let{sections:t}=e;return(0,l.jsx)("div",{className:"px-7 max-sm:px-5",children:t.map((e,a)=>(0,l.jsxs)(r.Fragment,{children:[a>0&&(0,l.jsx)(n.iz,{className:"summary"===t[a-1].id?"my-5":"my-7"}),(0,l.jsx)(x,{section:e})]},e.id))})};t.Z=p},15922:function(e,t,a){"use strict";a.d(t,{Z:function(){return z}});var l=a(85893),s=a(56746),n=a(40070),r=a(32113),i=a(67294),o=a(88729),c=a(27484),u=a.n(c),d=a(53424);let m=["본문분석","워크북","변형문제","기출문제","외부지문"],x=e=>
1"기출문제"===e?"기출적중 모의고사":e;function p(e){return e.slice().sort((e,t)=>{let a=m.findIndex(t=>e.title.includes(t)),l=m.findIndex(e=>t.title.includes(e));return(-1===a?m.length:a)-(-1===l?m.length:l)})}let h=e=>e.includes("변형문제")?"문제":"개",v=e=>{var t;let a="owned"===e.mode&&null!==(t=e.ticket.deductionMethod)&&void 0!==t?t:e.pass.deductionMethod;return a===d.eZ.AMOUNT},f=e=>e.category===d.J7.FreePass&&e.deductionMethod!==d.eZ.COUNT,b=(e,t)=>{var a;let l=null!==(a=e.isExpireMonthly)&&void 0!==a&&a,s=l?u()().endOf("month").diff(u()().startOf("day"),"day"):t.remainDay,n=u()(t.startedAt).format("YYYY.MM.DD"),r=l?u()().endOf("month").format("YYYY.MM.DD HH:mm:ss"):u()(t.expiredAt).format("YYYY.MM.DD HH:mm:ss");return{label:"남은 기간",value:"".concat(s,"일 (").concat(n," ~ ").concat(r,")")}},g=e=>{var t,a,l,s,r,i;let{pass:c,mode:u}=e,d=v(e),m=f(c),x=(0,o.u)(c.category),p=[];if("purchase"===u)return x||p.push(m?{value:"사용범위 내 무제한",tone:"highlight"}:{label:d?"총 사용 가능 금액":"총 사용 가능 횟수",value:d?"".concat((0,n.V2)(null!==(t=c.availableAmount)&&void 0!==t?t:0),"원"):"".concat((0,n.V2)(null!==(a=c.availableCount)&&void 0!==a?a:0),"회")}),p.push({label:"사용 기간",value:"결제일로부터 ".concat(c.period,"일간")}),{id:"summary",layout:"inline",rows:p};let{ticket:h}=e;return h.isExpired?null:(x||(p.push(m?{value:"사용범위 내 무제한",tone:"strong"}:{label:d?"남은 금액":"남은 횟수",value:d?"".concat((null===(l=h.remainAmount)||void 0===l?void 0:l.toLocaleString())||0,"원"):"".concat((0,n.V2)(null!==(s=h.remainCount)&&void 0!==s?s:0)||0,"회"),tone:"strong"}),m||p.push({label:d?"총 사용 가능 금액":"총 사용 가능 횟수",value:d?"".concat((null===(r=c.availableAmount)||void 0===r?void 0:r.toLocaleString())||0,"원"):"".concat((null!==(i=c.availableCount)&&void 0!==i?i:0).toLocaleString(),"회")})),p.push(b(c,h)),{id:"summary",layout:"inline",rows:p})},j=e=>({id:"scope",layout:"table",title:"이용권 사용범위",labelWidth:"sm",rows:(0,o.c)(e).filter(e=>""!==e.value).map(e=>({label:e.type,value:e.value}))}),y=e=>{var t,a;let{pass:l,mode:s}=e;if(!(0,o.u)(l.category)||"owned"===s&&e.ticket.isExpired)return null;let n=[];return("owned"===s&&(null===(t=e.ticket.detailProductStatus)||void 0===t?void 0:t.length)?n=p(e.ticket.detailProductStatus).map(e=>{var t,a;let l=!e.isLimited&&null===e.total,s=l||null!==e.remain&&e.remain>0,n=h(e.title);return{label:x(e.title),value:l?"무제한":"".concat((null!==(t=e.remain)&&void 0!==t?t:0).toLocaleString()).concat(n," 남음"),suffix:l?void 0:" / 총 ".concat((null!==(a=e.total)&&void 0!==a?a:0).toLocaleString()).concat(n),tone:s?"success":"error"}}):(null===(a=l.detailProducts)||void 0===a?void 0:a.length)&&(n=p(l.detailProducts).map(e=>{var t;let a=h(e.title);return{label:x(e.title),value:e.isLimited?"".concat((null!==(t=e.count)&&void 0!==t?t:0).toLocaleString()).concat(a):"무제한"}})),n.length)?{id:"expertScope",layout:"table",title:"엑스퍼트 사용범위",labelWidth:"md",rows:n}:null},N=e=>({id:"description",layout:"bullets",title:"이용권 상세정보",items:e.description?e.description.split("\n"):[]}),w=e=>[g(e),j(e.pass),y(e),N(e.pass)].filter(e=>null!==e);var k=a(24334);let C=e=>{var t;let{pass:a,membershipId:n,mode:i,position:c,primaryLabel:u,onPrimary:d,onUsageGuide:m}=e,x=(null===(t=a.guideButtonUrl)||void 0===t?void 0:t.trim())||((0,o.u)(a.category)?"https://solvookguide.oopy.io/expert":"https://solvookguide.oopy.io/waytouse"),p=null!=u?u:"purchase"===i?"구매하기":"확인",h=(e,t)=>{"purchase"!==i&&(0,s.f2)("Popup Button Clicked",{Position:c,"Popup Type":"이용권 상세 다이얼로그","Popup Title":a.title,"Button Name":e,"Button URL":t,"Membership Product Id":a.id,"Membership Id":n,"Membership Category":a.category})},v=()=>{if(h("이용방법 보기",x),m){m();return}window.open(x,"_blank","noopener,noreferrer")},f=()=>{h(p),d()};return(0,l.jsxs)("div",{className:"flex gap-2 px-7 pt-5 pb-5 max-sm:px-5 max-sm:pt-4 max-sm:pb-4 [&>button]:w-full",children:[(0,l.jsx)(r.zx,{variant:"stroke",color:"secondary",size:"lg",onClick:v,children:"이용방법 보기"}),(0,l.jsx)(r.zx,{variant:"fill",color:"primary",size:"lg",onClick:f,children:p})]})},P=e=>{let{pass:t}=e;return"owned"===e.mode?{mode:"owned",pass:t,ticket:e.ticket}:{mode:"purchase",pass:t}},Z=e=>"owned"===e.mode?e.ticket.membershipId:void 0,T=e=>{let{isOpen:t,onClose:a,pass:o,mode:c,position:u,primaryLabel:d,onPrimary:m,onUsageGuide:x}=e,p=Z(e),h=w(P(e));return(0,i.useEffect)(()=>{t&&(0,s.f2)("Popup Viewed",{Position:u,"Popup Type":"이용권 상세 다이얼로그","Popup Title":o.title,"Membership Product Id":o.id,"Membership Id":p,"Membership Category":o.category})},[t]),(0,l.jsx)(r.Vq,{open:t,onOpenChange:e=>
1!e&&a(),scroll:!0,classes:{contentWrapper:(0,n.cn)("w-[520px] max-w-[calc(100vw-40px)] max-h-[calc(100vh-144px)] gap-2","max-sm:!w-full max-sm:!max-w-full max-sm:!max-h-[calc(100svh-48px)]","max-sm:!fixed max-sm:!bottom-0 max-sm:!left-0 max-sm:!top-auto","max-sm:!translate-x-0 max-sm:!translate-y-0","max-sm:!rounded-b-none max-sm:!rounded-t-2xl","max-sm:data-[state=open]:animate-slide-in-from-bottom","max-sm:data-[state=closed]:animate-slide-out-to-bottom"),content:"flex flex-col min-h-0 pb-7"},title:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-2 px-5 pt-7 sm:hidden",children:[(0,l.jsx)(r.ZT,{variant:"h6",className:"text-primary flex-1 break-words",children:o.title}),(0,l.jsx)("button",{type:"button","aria-label":"닫기",onClick:a,className:"mt-0.5 shrink-0",children:(0,l.jsx)(r.ZZ.Close,{size:"sm"})})]}),(0,l.jsxs)("div",{className:"hidden items-start justify-between gap-2 px-7 pt-7 sm:flex",children:[(0,l.jsx)(r.$N,{title:o.title,className:"flex-1 break-all"}),(0,l.jsx)("button",{type:"button","aria-label":"닫기",onClick:a,className:"mt-1 block size-6 shrink-0 cursor-pointer focus:outline-none",children:(0,l.jsx)(r.ZZ.Close,{size:"sm"})})]})]}),footer:(0,l.jsx)(C,{pass:o,membershipId:p,mode:c,position:u,primaryLabel:d,onPrimary:m,onUsageGuide:x}),children:(0,l.jsx)(k.Z,{sections:h})})};var z=T},35975:function(e,t,a){"use strict";a.d(t,{Nr:function(){return c},P:function(){return l},UK:function(){return s},t0:function(){return n},yp:function(){return o}});let l=(e,t)=>{let a=t.replace(/[.*+\-?^${}()|[\]\\]/g,"\\$&");return!!new RegExp("^".concat(a)).exec(e)},s=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(null===e)return"";let a=Object.keys(e).filter(t=>""!==t&&void 0!==e[t]&&""!==e[t]).map(t=>"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))).join("&");return a?t?"?".concat(a):a:""},n=e=>{let t={},a=e.split("?");if(a.length>1){let e=a[1].split("&");e.forEach(e=>{let a=e.split("=");t[a[0]]=a[1]})}return t},r="solvook.com",i=()=>{let e="https://solvook.com";if(!e)return r;try{return new URL(e).hostname.replace(/^www\./,"").toLowerCase()}catch(e){return r}},o=e=>{if(!e||e.startsWith("//"))return null;if(e.startsWith("/"))return e;let t=/^https?:\/\//i.test(e)?e:"https://".concat(e);try{let{hostname:e,pathname:a,search:l,hash:s}=new URL(t),n=e.replace(/^www\./,"").toLowerCase();if(n===i())return a+l+s;return null}catch(e){return null}},c=e=>!e||/^https?:\/\//i.test(e)?e:e.startsWith("//")?"https:".concat(e):e.startsWith("/")?e:"https://".concat(e)},24379:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return M}});var l=a(85893),s=a(54741),n=a(15922),r=a(56746),i=a(73209),o=a(32113),c=a(11163),u=a(67294),d=a(22773),m=a(45788);let x="/passes",p="/passes/new",h=()=>{let e=(0,c.useRouter)(),t=(e,t)=>{(0,r.f2)("Page Default Button Clicked",{Position:"이용권 관리","Button Name":e,"Button URL":t,Type:"pass"})},a=()=>{t("이용권 구매하기",x),e.push(x)},s=()=>{t("이용권 코드로 등록",p),e.push(p)};return(0,l.jsxs)("div",{className:"flex gap-2 p-5 max-sm:flex-col",children:[(0,l.jsx)(o.zx,{variant:"stroke",color:"primary",size:"md",className:"w-full",leftElement:(0,l.jsx)(o.ZZ.Pass,{size:"xs",thick:!0}),onClick:a,children:"이용권 구매하기"}),(0,l.jsx)(o.zx,{variant:"stroke",color:"secondary",size:"md",className:"w-full",onClick:s,children:"이용권 코드 등록하기"})]})};var v=a(25675),f=a.n(v),b=a(53424),g=a(91582);let j=e=>{let{pass:t,onOpenInfo:a}=e,{productInfo:s}=t,n=s.category,{title:i}=s,c=b.no[n],u=g.RO[n],d=()=>{(0,r.f2)("Membership Info Button Clicked",{Position:"이용권 관리","Button Name":"상세정보","Membership Id":t.membershipId,"Product Id":s.id,Title:s.title,Category:s.category,"Remaining Days":t.remainDay}),null==a||a(t)};return(0,l.jsx)("div",{className:"rounded-md border-b border-gray-50",children:(0,l.jsxs)("div",{className:"flex w-full flex-col gap-5 p-5",children:[(0,l.jsxs)("div",{className:"pointer-events-none flex flex-col gap-5 opacity-50",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsx)(o.Vp,{color:g.UB[n],size:"sm",bold:!0,children:c})}),(0,l.jsxs)("div",{className:"flex gap-4",children:[(0,l.jsx)("div",{className:"size-14 shrink-0 overflow-hidden rounded-lg border border-gray-300/20",children:(0,l.jsx)(f(),{src:u,alt:i,width:56,height:56,className:"size-full object-cover"})}),(0,l.jsx)("div",{className:"flex flex-1 items-start",children:(0,l.jsx)(o.ZT,{variant:"subtitle1",className:"text-primary line-clamp-2",children:i})})]})]}),(0,l.jsxs)("div",{className:"flex gap-1.5",children:[(0,l.jsx)(o.zx,{variant:"stroke",color:"secondary",size:"md",onClick:d,children:"상세정보"}),(0,l.jsx)(o.zx,{variant:"stroke",color:"secondary",size:"md",className:"w-full flex-1",disabled:!0,rightElement:(0,l.jsx)(o.ZZ.ArrowRight,{size:"xs"}),children:"이용권 사용하기"})]})]})})};var y=a(35975),N=a(77099);let w=e=>{var t,a;let{pass:s,onOpenInfo:n}
1=e,i=(0,c.useRouter)(),{productInfo:u,startedAt:d,expiredAt:m,remainDay:x}=s,p=null!==(a=s.isPending)&&void 0!==a&&a,h=u.category,{title:v}=u,j=null===(t=u.useButtonUrl)||void 0===t?void 0:t.trim(),w=j?(0,y.yp)(j):null,k=b.no[h],C=g.RO[h],P={Position:"이용권 관리","Membership Id":s.membershipId,"Product Id":u.id,Title:u.title,Category:u.category,"Remaining Days":x},Z=()=>{(0,r.f2)("Membership Info Button Clicked",{...P,"Button Name":"상세정보"}),null==n||n(s)},T=()=>{(0,r.f2)("Membership Info Button Clicked",{...P,"Button Name":"이용권 사용하기","Button URL":j}),w?i.push(w):j&&(window.location.href=(0,y.Nr)(j))},z=e=>{e&&(0,r.f2)("Tooltip Viewed",{Position:"이용권 관리","Tooltip Type":"이용권 상태값 설명(사용대기)","Tooltip Text":"현재 사용중인 이용권의 만료 후 시작될 예정이에요."})};return(0,l.jsx)("div",{className:"rounded-md border-b border-gray-50",children:(0,l.jsxs)("div",{className:"flex w-full flex-col gap-5 p-5",children:[(0,l.jsx)("div",{className:"flex items-center gap-2",children:(0,l.jsx)(o.Vp,{color:g.UB[h],size:"sm",bold:!0,children:k})}),(0,l.jsxs)("div",{className:"flex gap-4",children:[(0,l.jsx)("div",{className:"size-14 shrink-0 overflow-hidden rounded-lg border border-gray-300/20",children:(0,l.jsx)(f(),{src:C,alt:v,width:56,height:56,className:"size-full object-cover"})}),(0,l.jsx)("div",{className:"flex flex-1 items-start",children:(0,l.jsx)(o.ZT,{variant:"subtitle1",className:"text-primary line-clamp-2",children:v})})]}),(0,l.jsx)(N.Z,{startDate:d,endDate:m,remainDay:x,isPending:p,pendingDescription:(0,l.jsxs)(o.ZT,{variant:"subtitle1",className:"text-white",children:["현재 사용중인 이용권의 ",(0,l.jsx)("br",{})," 만료 후 시작될 예정이에요."]}),onPendingTooltipOpenChange:z}),(0,l.jsxs)("div",{className:"flex gap-1.5",children:[(0,l.jsx)(o.zx,{variant:"stroke",color:"secondary",size:"md",onClick:Z,children:"상세정보"}),j&&(0,l.jsx)(o.zx,{variant:"stroke",color:"secondary",size:"md",className:"w-full flex-1",disabled:p,rightElement:(0,l.jsx)(o.ZZ.ArrowRight,{size:"xs"}),onClick:T,children:"이용권 사용하기"})]})]})})},k=e=>{let{items:t,variant:a,isLoading:s,onOpenInfo:n}=e;return s?(0,l.jsx)("div",{className:"flex h-[200px] items-center justify-center",children:(0,l.jsx)(o.$j,{size:"md",className:"text-gray-300"})}):t&&0!==t.length?(0,l.jsx)("ul",{className:"flex flex-col",children:t.map(e=>(0,l.jsx)("li",{children:"active"===a?(0,l.jsx)(w,{pass:e,onOpenInfo:n}):(0,l.jsx)(j,{pass:e,onOpenInfo:n})},e.membershipId))}):(0,l.jsx)("div",{className:"flex h-[200px] items-center justify-center",children:(0,l.jsx)(o.ZT,{variant:"body1",className:"text-secondary",children:"해당하는 이용권이 없어요."})})};var C=a(57146),P=a(507);let Z=()=>{var e,t,a,s;let x=(0,c.useRouter)(),[p,v]=(0,u.useState)("active"),[f,b]=(0,u.useState)(1),[j,y]=(0,u.useState)(null),N=(0,u.useCallback)(e=>{y(e)},[]),{data:w,isLoading:Z}=(0,C.a)(),{data:T}=(0,m.Z)(),z=(null!==(t=null==w?void 0:w.unexpired)&&void 0!==t?t:[]).filter(P.xK),M=(null!==(a=null==w?void 0:w.expired)&&void 0!==a?a:[]).filter(P.xK),R=M.slice((f-1)*g.e8,f*g.e8),E=(null!==(s=null==T?void 0:null===(e=T.subscriptions)||void 0===e?void 0:e.totalCount)&&void 0!==s?s:0)>0,D=!Z&&0===z.length&&E;(0,u.useEffect)(()=>{D&&x.replace(i.c$)},[D,x]);let I=e=>{v(e),"expired"===e&&b(1),(0,r.f2)("Tab UI Clicked",{Position:"이용권 관리","Tab Type":"이용권 관리","Tab Name":"active"===e?"사용중":"사용/기간만료"})};return(0,l.jsxs)("div",{className:"bg-white sm:mt-8 sm:rounded-lg lg:mt-0",children:[(0,l.jsxs)(o.mQ,{fullWidth:!0,value:p,onValueChange:I,tabs:[{value:"active",label:(0,l.jsxs)("span",{className:"flex items-center gap-1",children:["사용중",(0,l.jsx)(o.ZT,{as:"span",variant:"subtitle1",className:"text-secondary-main",children:z.length})]})},{value:"expired",label:"사용/기간만료"}],children:[(0,l.jsx)(o.I5,{value:"active"}),(0,l.jsx)(o.I5,{value:"expired"})]}),(0,l.jsx)(h,{}),(0,l.jsx)(k,{items:"active"===p?z:R,variant:p,isLoading:Z||D,onOpenInfo:N}),"expired"===p&&(0,l.jsx)(d.Z,{page:f,totalCount:M.length,pageSize:g.e8,onChange:b}),j&&(0,l.jsx)(n.Z,{isOpen:!0,pass:j.productInfo,ticket:j,mode:"owned",position:"마이쏠북",onPrimary:()=>y(null),onClose:()=>y(null)})]})};var T=a(20913);let z=()=>{let{isLoggedIn:e}=(0,T.Z)();return e?(0,l.jsx)(s.Z,{title:"이용권 관리",showHeaderBorder:!1,children:(0,l.jsx)(Z,{})}):null};z.getLayout=e=>e;var M=z}},function(e){e.O(0,[1060,9774,2888,179],function(){return e(e.s=83821)}),_N_E=e.O()}]);
2//# sourceMappingURL=passes-4b3b0aaf1c5642a9.js.map

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.