1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4672],{51809:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/books",function(){return n(67387)}])},83805:function(e,t,n){"use strict";n.d(t,{P4:function(){return s},Uq:function(){return u},fH:function(){return i},yZ:function(){return o},zm:function(){return c}});var r=n(26042),a=n(29061),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;return a.Z.get("/get/productlist",{baseURL:e,params:(0,r.Z)({start:t},n&&{category_id:n})}).then((function(e){return e.data}))},s=function(e,t){return a.Z.get("/get/product_by_id",{baseURL:e,params:{product_id:t}}).then((function(e){return e.data.data}))},u=function(e,t){return a.Z.get("/get/product_combo_items",{baseURL:e,params:{product_id:t}}).then((function(e){var t;return(null===(t=e.data)||void 0===t?void 0:t.data)||[]}))},i=function(e,t){return a.Z.get("/get/faqs",{baseURL:e,params:{course_id:t,item_type:5}}).then((function(e){return e.data.data}))},c=function(e){return a.Z.get("/get/product_categories",{baseURL:e}).then((function(e){return e.data}))}},67387:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return x}});var r=n(47568),a=n(97582),o=n(85893),s=n(23138),u=n(83805),i=n(64621),c=n(89885),l=n(67294),d=n(96076),g=n(47041),f=n(58533),p=n(6749),m=n(83609),h=n(4027),b=n(11163);function v(){return(0,o.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-10 w-full",children:Array.from({length:3}).map((function(e,t){return(0,o.jsxs)("div",{className:"flex flex-col gap-4 animate-pulse",children:[(0,o.jsx)("div",{className:"aspect-video w-full rounded-xl bg-muted"}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 px-1.5",children:[(0,o.jsx)("div",{className:"h-5 w-full rounded-md bg-muted"}),(0,o.jsx)("div",{className:"h-7 w-32 rounded-md bg-muted"}),(0,o.jsx)("div",{className:"h-10 w-full rounded-lg bg-muted"})]})]},t)}))})}function x(e){var t,n=(0,l.useContext)(c.Z).appConfig,d=(0,l.useState)(e.books.data),g=d[0],x=d[1],_=(0,l.useState)(0),y=_[0],w=_[1],k=(0,l.useState)(e.books.total>=10),Z=k[0],j=k[1],N=(0,l.useRef)(!1),C=(0,b.useRouter)(),R=C.query.categoryId,I=n.web_menubooksname||"Books",L=(0,h.Z)(n.web_enablebookcategoryfilter)&&(null===(t=e.categories)||void 0===t?void 0:t.length)>0,q=(e.categories||[]).map((function(e){return{id:e.id,title:e.exam_name}})),E=function(){var e=(0,r.Z)((function(e){var t,n,r;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:if(N.current)return[2];N.current=!0,t=e?0:y+10,a.label=1;case 1:return a.trys.push([1,3,4,5]),w(t),n=C.query.categoryId,[4,(0,u.yZ)("",t,n)];case 2:return r=a.sent(),x(e?r.data:g.concat(r.data)),j(r.data.length>=10),[3,5];case 3:return a.sent(),j(!1),[3,5];case 4:return N.current=!1,[7];case 5:return[2]}}
1))}));return function(t){return e.apply(this,arguments)}}();return(0,l.useEffect)((function(){x(e.books.data),w(0),j(e.books.total>=10),N.current=!1}),[e.books.data]),(0,o.jsxs)("div",{className:"flex flex-col gap-6 lg:gap-12 min-h-screen px-4 max-w-7xl mx-auto w-full py-6 lg:py-12",children:[(0,o.jsx)(p.Z,{content:{meta_title:I,og_title:I}}),(0,o.jsx)(m.Z,{breadcrumbs:[{label:"Home",href:"/"},{label:I}],showCategoryRow:L,categories:q,selectedCategoryId:R,allCategoryLabel:(null===I||void 0===I?void 0:I.startsWith("All"))?I:"All ".concat(I).trim(),onCategorySelect:function(e){(null===e||void 0===e?void 0:e.id)?C.push({pathname:"/books",query:{categoryId:e.id}}):C.push("/books")}}),(0,o.jsx)("div",{className:"flex flex-col gap-6",children:(0,o.jsx)(f.Z,{style:{overflow:"visible"},dataLength:(null===g||void 0===g?void 0:g.length)||0,next:E,hasMore:Z,loader:(0,o.jsx)(v,{}),endMessage:0!=(null===g||void 0===g?void 0:g.length)?(0,o.jsx)(o.Fragment,{}):(0,o.jsx)(s.Z,{color:"primary",isOpen:!0,children:"No books found"}),children:(0,o.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-6 gap-y-10 w-full",children:g.map((function(e){return(0,o.jsx)(i.Z,{title:e.title,image:e.image,price:e.price_without_shipping,mrp:e.mrp,currency:e.currency,link:"/books/".concat(e.id,"-").concat(e.slugifytitle),isBestSeller:(0,h.Z)(e.is_best_seller),buttonText:"View"},e.id)}))})})})]})}x.getInitialProps=function(){var e=(0,r.Z)((function(e){var t,n,r,o,s;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return t=(0,g.getCookie)(d.z1,e),n=e.query.categoryId,[4,(0,u.yZ)(t,0,n)];case 1:(r=a.sent()).total=r.data.length,o=[],a.label=2;case 2:return a.trys.push([2,4,,5]),[4,(0,u.zm)(t)];case 3:return s=a.sent(),o=s.data,[3,5];case 4:return a.sent(),[3,5];case 5:return[2,{books:r,categories:o,categoryId:n}]}}))}));return function(t){return e.apply(this,arguments)}}()}},function(e){e.O(0,[4706,3609,8504,9774,2888,179],(function(){return t=51809,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.