PageSourceSearch

https://supermocks.com/_next/static/chunks/pages/live-tests-10f8de6f29b52769.js

js supermocks.com collected 2026-09-24 14:55:55 UTC 17,300 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2159],{96698:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/live-tests",function(){return s(59e3)}])},6749:function(e,t,s){"use strict";var n=s(85893),o=s(89885),r=s(96486),i=s(9008),a=s.n(i),l=s(11163),c=s(67294),d=s(91036),u=s.n(d),m=function(e){return e?u()(e,{allowedTags:[],allowedAttributes:{}}).trim():""},g=function(e,t){var s=e.replace(/\/+$/,""),n=/^https?:\/\//i.test(s)?s:"https://".concat(s),o=(t||"/").split(/[?#]/)[0];return"/"===o?"".concat(n,"/"):"".concat(n).concat(o)};t.Z=function(e){var t=e.content,s=(0,c.useContext)(o.Z).appConfig,i=(0,l.useRouter)();return t?(0,n.jsxs)(a(),{children:[t.host&&(0,r.isEmpty)(s.web_canonicalurl)&&(0,n.jsx)("link",{rel:"canonical",href:g(t.host,null===i||void 0===i?void 0:i.asPath)},"canonical"),t.meta_title&&(0,n.jsx)("meta",{name:"title",content:t.meta_title},"title"),t.meta_description&&(0,n.jsx)("meta",{name:"description",content:m(t.meta_description)},"description"),t.jsonld_schema&&(0,n.jsx)("script",{type:"application/ld+json",children:t.jsonld_schema}),(t.og_image||t.course_thumbnail)&&(0,n.jsx)("meta",{property:"og:image",content:t.og_image||t.course_thumbnail},"og:image"),t.og_title&&(0,n.jsx)("meta",{property:"og:title",content:t.og_title},"og:title"),t.og_description&&(0,n.jsx)("meta",{property:"og:description",content:m(t.og_description)},"og:description"),t.og_url&&(0,n.jsx)("meta",{property:"og:url",content:t.og_url}),t.og_type&&(0,n.jsx)("meta",{property:"og:type",content:t.og_type},"og:type"),t.og_locale&&(0,n.jsx)("meta",{property:"og:locale",content:t.og_locale}),t.og_site_name&&(0,n.jsx)("meta",{property:"og:site_name",content:t.og_site_name}),t.og_video&&(0,n.jsx)("meta",{property:"og:video",content:t.og_video}),t.og_video_secure_url&&(0,n.jsx)("meta",{property:"og:video:secure_url",content:t.og_video_secure_url}),t.og_video_width&&(0,n.jsx)("meta",{property:"og:video:width",content:t.og_video_width}),t.og_video_height&&(0,n.jsx)("meta",{property:"og:video:height",content:t.og_video_height}),t.og_video_type&&(0,n.jsx)("meta",{property:"og:video:type",content:t.og_video_type}),t.og_video_tag&&(0,n.jsx)("meta",{property:"og:video:tag",content:t.og_video_tag}),t.og_video_duration&&(0,n.jsx)("meta",{property:"og:video:duration",content:t.og_video_duration}),t.og_video_series&&(0,n.jsx)("meta",{property:"og:video:series",content:t.og_video_series}),t.og_video_season&&(0,n.jsx)("meta",{property:"og:video:season",content:t.og_video_season}),t.og_video_show_type&&(0,n.jsx)("meta",{property:"og:video:show_type",content:t.og_video_show_type}),t.og_video_actor&&(0,n.jsx)("meta",{property:"og:video:actor",content:t.og_video_actor}),!(0,r.isEmpty)(s.web_googleSiteVerification)&&(0,n.jsx)("meta",{name:"google-site-verification",content:s.web_googleSiteVerification})]}):null}},76891:function(e,t,s){"use strict";s.d(t,{Z:function(){return g}});var n=s(29815),o=s(85893),r=s(11163),i=s(19201),a=s(95719),l=s(83024),c=s(60766),d=s(23149),u=s(84082),m=s(44898);function g(e){var t=e.isSectionSelectorOpen,s=e.toggleSectionSelector,g=e.selectedTest,f=e.sections,p=void 0===f?[]:f,x=e.setSections,h=(0,r.useRouter)();if(!g||!p)return null;return(0,o.jsxs)(a.Z,{isOpen:t,toggle:s,children:[(0,o.jsx)(l.Z,{toggle:s,children:"Select Sections"}),(0,o.jsxs)(c.Z,{children:[(0,o.jsxs)("div",{className:"text-danger mb-3",children:["Please select atleast ",g.minimumsection," sections"]}),p.filter((function(e){return"1"==e.is_optional})).map((function(e,t){return(0,o.jsx)("div",{className:"".concat(e.selected?"bg-secondary ":"bg-light"," p-3  mb-3 cursor-pointer rounded"),onClick:function(t){e.selected=1!=e.selected,x((0,n.Z)(p))},children:e.section_title},e.section_id)}))]}),(0,o.jsx)(d.Z,{children:(0,o.jsx)(u.Z,{onClick:function(){var e=p.filter((function(e){return e.selected||"1"!=e.is_optional})).map((function(e){return e.section_id}));e.length<g.minimumsection?i.A.error("Please attempt atleast ".concat(g.minimumsection," sections")):(p.filter((function(e){return"1"==e.is_optional})),e.length>g.maximumsection?i.A.error("Maximum only ".concat(g.maximumsection," sections are allowed")):(localStorage.setItem("selected_sections",e.
1join(",")),(0,m.NX)(g,h)))},children:"Select"})})]})}},63755:function(e,t,s){"use strict";s.d(t,{Bw:function(){return v},Ph:function(){return g},Ql:function(){return j},i4:function(){return p},ki:function(){return f}});var n=s(26042),o=s(69396),r=s(99534),i=s(85893),a=s(67294),l=s(76405),c=s(8971),d=s(84979),u=s(13742),m=s(62461),g=l.fC,f=(l.ZA,l.B4),p=a.forwardRef((function(e,t){var s=e.className,a=e.children,d=(0,r.Z)(e,["className","children"]);return(0,i.jsxs)(l.xz,(0,o.Z)((0,n.Z)({ref:t,className:(0,m.cn)("flex h-10 w-full cursor-pointer items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-colors data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s)},d),{children:[a,(0,i.jsx)(l.JO,{asChild:!0,children:(0,i.jsx)(c.Z,{className:"h-4 w-4 opacity-50"})})]}))}));p.displayName=l.xz.displayName;var x=a.forwardRef((function(e,t){var s=e.className,a=(0,r.Z)(e,["className"]);return(0,i.jsx)(l.u_,(0,o.Z)((0,n.Z)({ref:t,className:(0,m.cn)("flex cursor-default items-center justify-center py-1",s)},a),{children:(0,i.jsx)(d.Z,{className:"h-4 w-4"})}))}));x.displayName=l.u_.displayName;var h=a.forwardRef((function(e,t){var s=e.className,a=(0,r.Z)(e,["className"]);return(0,i.jsx)(l.$G,(0,o.Z)((0,n.Z)({ref:t,className:(0,m.cn)("flex cursor-default items-center justify-center py-1",s)},a),{children:(0,i.jsx)(c.Z,{className:"h-4 w-4"})}))}));h.displayName=l.$G.displayName;var v=a.forwardRef((function(e,t){var s=e.className,a=e.children,c=e.position,d=void 0===c?"popper":c,u=e.portalled,g=void 0===u||u,f=(0,r.Z)(e,["className","children","position","portalled"]),p=(0,i.jsxs)(l.VY,(0,o.Z)((0,n.Z)({ref:t,className:(0,m.cn)("relative z-[100] max-h-[var(--radix-select-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-select-content-transform-origin)]","popper"===d&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:d},f),{children:[(0,i.jsx)(x,{}),(0,i.jsx)(l.l_,{className:(0,m.cn)("p-1","popper"===d&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:a}),(0,i.jsx)(h,{})]}));return g?(0,i.jsx)(l.h_,{children:p}):p}));v.displayName=l.VY.displayName,a.forwardRef((function(e,t){var s=e.className,o=(0,r.Z)(e,["className"]);return(0,i.jsx)(l.__,(0,n.Z)({ref:t,className:(0,m.cn)("py-1.5 pl-8 pr-2 text-sm font-semibold",s)},o))})).displayName=l.__.displayName;var j=a.forwardRef((function(e,t){var s=e.className,a=e.children,c=(0,r.Z)(e,["className","children"]);return(0,i.jsxs)(l.ck,(0,o.Z)((0,n.Z)({ref:t,className:(0,m.cn)("relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors duration-200 hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",s)},c),{children:[(0,i.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,i.jsx)(l.wU,{children:(0,i.jsx)(u.Z,{className:"h-4 w-4"})})}),(0,i.jsx)(l.eT,{children:a})]}))}));j.displayName=l.ck.displayName,a.forwardRef((function(e,t){var s=e.className,o=(0,r.Z)(e,["className"]);return(0,i.jsx)(l.Z0,(0,n.Z)({ref:t,className:(0,m.cn)("-mx-1 my-1 h-px bg-muted",s)},o))})).displayName=l.Z0.displayName},59e3:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return T}});var n=s(85893),o=s(67294),r=s(47041),i=s(47568),a=s(29815),l=s(97582),c=s(96076),d=s(7386),u=s(89885),m=s(58533),g=s(23138),f=s(11163),p=s(86086),x=s(76891),h=s(35739),v=s(80611),j=s(95160),_=s(1211),b=s(45077),y=s(36316),N=s(22295),w=s(45977);function Z(e){var t,s;return[{title:(null===e||void 0===e?void 0:e.web_testtitletabname)||"Tests",key:"tests",order:null!==(t=null===e||void 0===e?void 0:e.web_testtitletabposition)&&void 0!==t?t:0,isEnabled:!0},{title:(null===e||void 0===e?void 0:e.web_subjectivetitletabname)||"Test Subjectives",key:"subjective",order:null!==(s=null===e||void 0===e?void 0:e.web_testsubjectivetabposition)&&void 0!==s?s:1,isEnabled:!0}].filter((function(e){return e.isEnabled})).sort((function(e,t){return e.order-t.order}))}function S(e){var t=e.children;return(0,n.jsx)("div",{className:"flex min-h-[40vh] flex-col items-center justify-center gap-4 roun
1ded-2xl border border-dashed border-border bg-card/50 px-6 py-16 text-center",children:t})}function k(e){var t=e.test,s=e.hasSession,o=e.toggleAuthModal,r=e.setIsLogin,i=(0,f.useRouter)(),a=(0,j.f3)(t),l=(0,j.YN)(t),c=(0,j.nf)(t),d="live"===a.status;return(0,n.jsxs)("article",{className:"flex h-full flex-col overflow-hidden rounded-xl border border-border bg-secondary",children:[(0,n.jsxs)("div",{className:"flex flex-1 flex-col gap-3 p-3 pb-4",children:[d&&(0,n.jsxs)(v.Z,{className:"border border-red-200 bg-red-50 text-red-600 dark:border-red-900 dark:bg-red-950/30 dark:text-red-400",children:[(0,n.jsx)("span",{className:"size-1.5 rounded-full bg-red-500"}),"Live"]}),(0,n.jsx)("h3",{className:"mb-0 line-clamp-2 text-base font-semibold tracking-tight text-foreground",children:t.title}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground",children:[l?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,n.jsx)(_.Z,{className:"size-4 shrink-0"}),l," Qs"]}):null,c?(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,n.jsx)(b.Z,{className:"size-4 shrink-0"}),c]}):null,t.marks?(0,n.jsxs)("span",{children:[t.marks," Marks"]}):null]}),"scheduled"===a.status&&a.startsAt&&(0,n.jsxs)("p",{className:"mb-0 text-xs text-muted-foreground",children:["Goes live on ",a.startsAt.format("D MMM YYYY, h:mm A")]}),"ended"===a.status&&(0,n.jsx)("p",{className:"mb-0 text-xs text-destructive",children:"This test has ended"})]}),(0,n.jsx)("div",{className:"border-t border-border bg-primary/10 p-3",children:s?d||"ended"===a.status?(0,n.jsx)(h.z,{className:"w-full",onClick:function(){return i.push("/test-series/".concat(t.test_series_id,"/test-subjective/").concat(t.id))},children:d?"View Test":"View Question Paper"}):(0,n.jsx)(h.z,{disabled:!0,className:"w-full cursor-not-allowed",children:"Upcoming"}):(0,n.jsx)(h.z,{className:"w-full",onClick:function(){r(!0),o()},children:"Login to View"})})]})}function C(e){var t=e.tests,s=e.hasMore,o=e.isLoading,r=e.isLoadingMore,i=e.onLoadMore,a=e.emptyMessage,l=e.renderItem;return o?(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-muted-foreground",children:[(0,n.jsx)(y.Z,{className:"size-4 animate-spin"}),(0,n.jsx)("span",{children:"Loading..."})]}):t.length?(0,n.jsx)(m.Z,{dataLength:t.length,next:i,hasMore:s,hasChildren:t.length>0,className:"!overflow-visible",loader:r?(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground",children:[(0,n.jsx)(y.Z,{className:"size-4 animate-spin"}),(0,n.jsx)("span",{children:"Loading more..."})]}):null,endMessage:null,children:(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3 sm:gap-5",children:t.map(l)})}):(0,n.jsxs)(S,{children:[(0,n.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-muted text-muted-foreground",children:(0,n.jsx)(N.Z,{className:"size-6"})}),(0,n.jsx)("div",{className:"space-y-1",children:(0,n.jsx)("h3",{className:"text-base font-semibold text-foreground",children:a})})]})}function M(e){var t,s=e.activeTab,m=(e.onTabChange,e.onTabCountsChange),f=(0,o.useContext)(u.Z),v=f.appConfig,j=f.hasSession,_=f.toggleAuthModal,b=f.setIsLogin,y=(0,r.getCookie)(c.z1),N=(0,o.useMemo)((function(){return Z(v)}),[v]),M=(0,o.useState)((null===(t=N[0])||void 0===t?void 0:t.key)||"tests"),z=M[0],L=(M[1],null!==s&&void 0!==s?s:z),T=(0,o.useState)([]),E=T[0],R=T[1],A=(0,o.useState)([]),I=A[0],P=A[1],O=(0,o.useState)(!1),V=O[0],Y=O[1],G=(0,o.useState)(!1),Q=G[0],X=G[1],$=(0,o.useState)(!1),B=$[0],F=$[1],U=(0,o.useState)(!1),q=U[0],D=U[1],H=(0,o.useState)(!1),J=H[0],K=H[1],W=(0,o.useState)(!1),ee=W[0],te=W[1],se=(0,o.useState)(),ne=se[0],oe=se[1],re=(0,o.useState)(),ie=re[0],ae=re[1],le=(0,o.useState)(!1),ce=le[0],de=le[1],ue=function(){return de((function(e){return!e}))},me=function(){var e=(0,i.Z)((function(){var e,t,s,n,o,r=arguments;return(0,l.__generator)(this,(function(i){switch(i.label){case 0:if((e=r.length>0&&void 0!==r[0]&&r[0])&&B)return[2];if(!e&&(q||!V))return[2];t=e?0:E.length,e?F(!0):D(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,d.zv)(y,t)];case 2:return s=i.sent(),n=s.data||[],R((function(t){return e?n:(0,a.Z)(t).concat((0,a.Z)(n))})),Y(n.length>=10),[3,5];case 3:return o=i.sent(),console.error(o),Y(!1),[3,5];case 4:return F(!1),D(!1),[7];case 5:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),ge=function(){var e=(0,i.Z)((function(){var e,t,s,n,o,r=arguments;return(0,l.__generator)(this,(function(i){switch(i.label){case 0:if((e=r.length>0&&void 0!==r[0]&&r[0])&&J)return[2];if(!e&&(ee||!Q))return[2];t=e?0:I.length,e?K(!0):te(!0),i.label=1;case 1:return i.trys.push([1,3,4,5]),[4,(0,d.aZ)(y,t)];case 2:return s=i.sent(),n=s.data||[],P((function(t){return e?n:(0,a.Z)(t).concat((0,a.Z)(n))})),X(n.length>=10),[3,5];case 3:return o=i.sent(),console.error(o),X(!1),[3,5];case 4:return K(!1),te(!1),[7];case 5:return[2]}}))}));return function(){return e.apply(this,arguments)}}();if((0,o.useEffect)((function(){null===m||void 0===m||m({tests:E.length,subjective:I.length})}),[E.length,m,I.length]),(0,o.useEffect)((function(){if(!j)return R([]),P([]),Y(!1),void X(!1);"tests"!==L?ge(!0):me(!0)}),[j,L]),!j)return(0,n.jsxs)(S,{children:[(0,n.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-primary/10 text-primary",children:(0,n.jsx)(w.Z,{className:"size-6"})}),(0,n.jsxs)("div",{className:"space-y-1",children:[(0,n.jsx)("h3",{className:"text-base font-semibold text-foreground",children:"Sign in to view live tests"}),(0,n.jsx)("p",{className:"mx-auto max-w-xs text-sm text-muted-foreground",children:"Log in to see currently live tests and attempt them before they end."})]}),(0,n.jsx)(h.z,{onClick:function(){b(!0),_()},children:"Login to view live tests"})]});if(0===N.length)return(0,n.jsx)(g.Z,{color:"primary",isOpen:!0,children:"No live tests available"});return(0,n.jsxs)(n.Fragment,{children:["subjective"===L?(0,n.jsx)(C,{tests:I,hasMore:Q,isLoading:J,isLoadingMore:ee,onLoadMore:function(){return ge(!1)},emptyMessage:"No subjective tests available",renderItem:function(e){return(0,n.jsx)(k,{test:e,hasSession:j,toggleAuthModal:_,setIsLogin:b},e.id)}}):(0,n.jsx)(C,{tests:E,hasMore:V,isLoading:B,isLoadingMore:q,onLoadMore:function(){return me(!1)},emptyMessage:"No live tests available",renderItem:function(e){return(0,n.jsx)(p.Z,{test:e,isPaidScreen:!0,cardLayout:"quiz",setSelectedTest:oe,toggleSectionSelector:ue,setSections:ae},e.id)}}),ce&&(0,n.jsx)(x.Z,{isSectionSelectorOpen:ce,toggleSectionSelector:ue,selectedTest:ne,sections:ie,setSections:ae})]})}var z=s(83609),L=s(6749);function T(){var e,t=(0,o.useContext)(u.Z).appConfig,s=t.web_menulivetestsname||"Live Tests",r=(0,o.useMemo)((function(){return Z(t)}),[t]),i=(0,o.useState)((null===(e=r[0])||void 0===e?void 0:e.key)||"tests"),a=i[0],l=i[1],c=(0,o.useState)({}),d=c[0],m=c[1];(0,o.useEffect)((function(){var e;r.some((function(e){return e.key===a}))||l((null===(e=r[0])||void 0===e?void 0:e.key)||"tests")}),[a,r]);var g=(0,o.useMemo)((function(){return r.map((function(e){return{id:e.key,title:e.title,count:d[e.key]}}))}),[d,r]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(L.Z,{content:{meta_title:s,og_title:s}}),(0,n.jsxs)("div",{className:"mx-auto flex min-h-screen w-full max-w-7xl flex-col gap-6 px-4 py-6 lg:gap-12 lg:py-12",children:[(0,n.jsx)(z.Z,{breadcrumbs:[{label:"Home",href:"/"},{label:s}],categories:g,selectedCategoryId:a,onCategorySelect:function(e){var t,s,n;l(null!==(n=null!==(s=null===e||void 0===e?void 0:e.id)&&void 0!==s?s:null===(t=r[0])||void 0===t?void 0:t.key)&&void 0!==n?n:"tests")},showCategoryRow:g.length>0}),(0,n.jsx)("div",{className:"flex w-full flex-col gap-6",children:(0,n.jsx)(M,{activeTab:a,onTabChange:l,onTabCountsChange:m})})]})]})}}},function(e){e.O(0,[4885,8534,7432,1580,8285,3609,4898,5328,6086,9774,2888,179],(function(){return t=96698,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.