1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1747],{12628:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var o=n(85893),r=n(77836),i=n(62559),l=n(7994),s=n(33299),a=n(25675),d=n.n(a),c=n(41664),u=n.n(c),m=n(35005),x=n(80065),p=n(11163),v=n(64583),h=n(44173),f=function(e){var t=e.orderNo;return(0,o.jsx)("div",{className:"w-[50px] z-50 absolute border shadow-sm top-0 left-0 rounded-br-lg bg-[#BF0000] p-2 flex items-center justify-center",children:(0,o.jsx)("span",{className:"text-white font-semibold text-[18px]",children:t})})};function g(e){var t,n=e.data,a=e.showOrderNo,c=void 0===a||a,g=e.withAddToCart,N=void 0===g||g,j=(0,r.i)().dispatchCart,w=(0,s.useSession)().data,b=(0,x.hn)().showAuthForm,k=(0,p.useRouter)();if(!n)return null;var _=n.bookType===i._i.BOOK?"/books/".concat(n.category,"/").concat(n.readableId):"/promotion-books/".concat(n.id,"/").concat(n.readableId),C=0===(null===n||void 0===n?void 0:n.limitedStock);return(0,o.jsx)("div",{className:"py-2 flex flex-col gap-1",children:(0,o.jsxs)("div",{className:"baby-phone:w-[120px] w-[145px] hover:cursor-pointer relative max-w-[200px] md:w-[200px] lg:w-[220px] lg:max-w-[220px] 2xl:w-[260px] 2xl:max-w-[260px] flex flex-col",children:[(0,o.jsx)("div",{className:"min-h-[260px] lg:min-h-[340px] ",children:(0,o.jsx)(u(),{href:_,children:(0,o.jsx)("a",{children:(0,o.jsxs)("div",{children:[c&&(0,o.jsx)(f,{orderNo:n.orderNo}),(0,o.jsx)("div",{className:"w-[100%] h-[140px] md:h-[190px] lg:h-[220px] relative overflow-hidden rounded-lg",children:(0,o.jsx)(d(),{src:n.image,alt:n.title,layout:"fill",blurDataURL:i.Rt})}),(0,o.jsxs)("div",{className:"m-1 flex flex-col gap-1",children:[(0,o.jsx)("span",{className:"leading-relaxed line-clamp-1 text-[16px] font-normal",children:n.title}),(0,o.jsx)("span",{className:"text-[16px] line-clamp-1 font-normal text-[#737373]",children:n.authorName||(null===(t=null===n||void 0===n?void 0:n.books[0])||void 0===t?void 0:t.authorName)||""}),n.actualAmount?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("span",{className:"text-[16px] font-semibold",children:["MMK ",(0,l.u)(n.price)]}),(0,o.jsxs)("span",{className:"text-[16px] text-[#737373] line-through font-normal",children:["MMK ",(0,l.u)(n.actualAmount)]})]}):(0,o.jsxs)("span",{className:"text-[16px] font-semibold",children:["MMK ",(0,l.u)(n.price)]})]})]})})})}),N&&(0,o.jsx)(m.Z,{onClick:function(){return!C&&(e=n,void(w?(j({type:v.SY.ADD_ITEM,payload:{id:null===e||void 0===e?void 0:e.id,itemName:null===e||void 0===e?void 0:e.title,remainedStock:null===e||void 0===e?void 0:e.limitedStock,promotion:{price:null===e||void 0===e?void 0:e.price,actualAmount:null===e||void 0===e?void 0:e.actualAmount},subTitle:null===e||void 0===e?void 0:e.authorName,itemType:null===e||void 0===e?void 0:e.bookType,productImage:null===e||void 0===e?void 0:e.image}}),k.push("/cart"),h.Am.success("Added to cart successfully")):b(x.Gr.SignUp)));var e},className:"flex justify-center mt-3 text-[16px] border text-[#5C5C5C] items-center w-full gap-2",variant:"outline-light",children:C?"Out of Stock":"Add to Cart"})]})})}},11747:function(e,t,n){"use strict";n.d(t,{Z:function(){return u},s:function(){return c}});var o=n(85893),r=n(41664),i=n.n(r),l=n(67294),s=n(86529),a=n(12628),d=n(23645),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,l.useMemo)((function(){return e.sort((function(e,t){return e.orderNo>t.orderNo?1:e.orderNo<t.orderNo?-1:0}))}),[e])};function u(e){var t=e.books,n=c(void 0===t?[]:t),r=(0,l.useRef)({superLargeDesktop:{breakpoint:{max:4e3,min:3e3},items:6,slidesToSlide:1},desktop:{breakpoint:{max:3e3,min:1024},items:4,slidesToSlide:1},tablet:{breakpoint:{max:1024,min:560},items:3,slidesToSlide:1},mobile:{breakpoint:{max:599,min:0},items:2,slidesToSlide:1}}).current;return 0===n.length?null:(0,o.jsxs)("div",{className:"py-[64px] w-[100%] lg:w-[85%] md:w-[95%] mx-auto",children:[(0,o.jsxs)("div",{className:"flex justify-between items-center",children:[(0,o.jsx)("h5",{className:"text-[24px] font-bold leading-loose ",children:"Best Sellers of the Month"}),(0,o.jsx)(i(),{href:"/books",children:(0,o.jsx)("span",{className:"hover:cursor-pointer hover:opacity-50",style:{fontSize:"16px",color:"#737373",fontWeight:"600"},children:"See All"})})]}),(0,o.jsx)("div",{className:"relative w-[100%]",children:(0,o.jsx)(s.default,{infinite:!0,autoPlay:!0,autoPlaySpeed:2e3,responsive:r,itemClass:"p-2",containerClass:"position-initial py-3",customRightArrow:(0,o.jsx)(d.iO,{}),customLeftArrow:(0,o.jsx)(d.qi,{}),children:n.map((function(e,t){return(0,o.jsx)(a.Z,{data:e,index:t,withAddToCart:!0},e.id)}))})})]})}},23645:function(e,t,n){"use strict";n.d(t,{qi:function(){return N},iO:function(){return g},ZP:function(){return j}});var o=n(99534),r=n(85893),i=n(25675),l=n.n(i),s=n(86529),a=(n(16494),n(60370)),d=n.n(a),c=n(41664),u=n.n(c),m=n(55512),x=n(51479),p=n(35005);function v(e){var t=e.className,n=void 0===t?"":t,o=e.title,i=e.href,l=e.completedPercent;return(0,r.jsx)(m.Z,{className:"md:w-[330px] lg:w-[350px] w-[300px] min-h-[200px] max-h-[200px] ".concat(n),children:(0,r.jsxs)("div",{className:"flex p-3 flex-col gap-3 justify-between",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("h5",{className:"text-[16px] md:text-[18px] font-semibold line-clamp-1 leading-relaxed",children:o}),(0,r.jsxs)("span",{className:"text-[#737373] text-[16px]",children:[l,"% Completed"]})]}),(0,r.jsxs)("div",{className:" flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-[80%]",children:(0,r.jsx)(x.Z,{className:"h-[10px]",variant:"danger",now:l})}),(0,r.jsx)(u(),{href:i,children:(0,r.jsx)(p.Z,{className:"primary-btn",size:"sm",children:"Continue"})})]})]})})}var h=n(55177),f=n(33299),g=function(e){var t=e.onClick,n=(0,o.Z)(e,["onClick"]),i=(n.onMove,n.carouselState);i.currentSlide,i.deviceType;return(0,r.jsx)("div",{className:d()["custom-right-arrow"],children:(0,r.jsx)(l(),{src:"/icons/right-arrow.svg",alt:"left arrow",width:40,height:40,onClick:function(){return t()}})})},N=function(e){e.onClick;var t=(0,o.Z)(e,["onClick"]),n=(t.onMove,t.carouselState);n.currentSlide,n.deviceType;return null},j=function(){var e,t,n=(0,f.useSession)().data,o=(0,h.q)({studentId:null===n||void 0===n||null===(e=n.user)||void 0===e?void 0:e.id,accessToken:null===n||void 0===n||null===(t=n.user)||void 0===t?void 0:t.accessToken}).data,i=void 0===o?[]:o;return i&&0!==i.length?(0,r.jsxs)("div",{className:"relative pb-10 w-[100%] lg:w-[85%] md:w-[95%] mx-auto md:gap-3",children:[(null===i||void 0===i?void 0:i.length)>0&&(0,r.jsxs)("h5",{className:"text-[24px] font-semibold",children:["Let","'","s Complete Your Journey"]}),(0,r.jsx)(s.default,{infinite:!0,autoPlay:!0,autoPlaySpeed:3e3,responsive:{superLargeDesktop:{breakpoint:{max:4e3,min:1800},items:4,slidesToSlide:1},desktop:{breakpoint:{max:1800,min:1024},items:3,slidesToSlide:1},tablet:{breakpoint:{max:1024,min:464},items:2,slidesToSlide:1},mobile:{breakpoint:{max:464,min:0},items:1,slidesToSlide:1}},ssr:!0,itemClass:d()["carousel-items"],containerClass:d()["carousel-container"],customRightArrow:(0,r.jsx)(g,{}),customLeftArrow:(0,r.jsx)(N,{}),children:i.map((function(e){var t,n;return(0,r.jsx)(v,{title:null===e||void 0===e||null===(t=e.course)||void 0===t?void 0:t.t
1itle,completedPercent:(null===e||void 0===e?void 0:e.overallProgress)||0,href:"/courses/learn?courseId=".concat(null===e||void 0===e||null===(n=e.course)||void 0===n?void 0:n.id,"&moduleIndex=0")},e.id)}))})]}):null}},55177:function(e,t,n){"use strict";n.d(t,{C:function(){return c},q:function(){return l}});var o=n(42388),r=n(78551),i=n(94402);function l(e){var t=e.studentId,n=e.accessToken;return(0,r.a)({queryKey:i.U7.USER_ENROLLMENTS,queryFn:function(){return(0,o.Gt)({page:0,studentId:t,accessToken:n,enrollStatus:"APPROVED"})},select:function(e){return e.content||[]},enabled:!!t&&!!n})}var s=n(29726),a=n(33299),d=n(67294);function c(){var e=(0,a.useSession)().data,t=(0,s.N)({queryKey:i.U7.PAGINATED_ENROLLMENTS,enabled:!!(null===e||void 0===e?void 0:e.user),queryFn:function(t){var n,r,i=t.pageParam;return(0,o.Gt)({page:i,size:10,enrollStatus:"APPROVED",studentId:null===e||void 0===e||null===(n=e.user)||void 0===n?void 0:n.id,accessToken:null===e||void 0===e||null===(r=e.user)||void 0===r?void 0:r.accessToken})},initialPageParam:0,getNextPageParam:function(e,t,n){if(e&&!(null===e||void 0===e?void 0:e.last))return n+1}}),n=t.data,r=t.isLoading,l=t.isFetching,c=t.hasNextPage,u=t.fetchNextPage,m=(0,d.useMemo)((function(){var e;return n&&(null===(e=n.pages)||void 0===e?void 0:e.flatMap((function(e){return e.content||[]})))||[]}),[n]);return{isLoading:r,isFetching:l,hasNextPage:c,fetchNextPage:u,enrollments:m}}},60370:function(e){e.exports={"partners-wrapper":"EnrollmentCarousel_partners-wrapper__muk3W","margin-override":"EnrollmentCarousel_margin-override__qX6Wg","partners-carousel":"EnrollmentCarousel_partners-carousel__1FFqt","partners-logos":"EnrollmentCarousel_partners-logos__m_N_4","carousel-items":"EnrollmentCarousel_carousel-items__CDqXn",directions:"EnrollmentCarousel_directions__qxqwm","carousel-container":"EnrollmentCarousel_carousel-container__BtMWA","custom-right-arrow":"EnrollmentCarousel_custom-right-arrow__6UTIW","custom-left-arrow":"EnrollmentCarousel_custom-left-arrow__jxLvm"}}}]);
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.