1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4782],{760:e=>{var t={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createOrder"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"productId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"courseId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"batchId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createOrder"},arguments:[{kind:"Argument",name:{kind:"Name",value:"orderInput"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"orderItems"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"productId"},value:{kind:"Variable",name:{kind:"Name",value:"productId"}}},{kind:"ObjectField",name:{kind:"Name",value:"selectedBatches"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"courseId"},value:{kind:"Variable",name:{kind:"Name",value:"courseId"}}},{kind:"ObjectField",name:{kind:"Name",value:"batchId"},value:{kind:"Variable",name:{kind:"Name",value:"batchId"}}}]}]}}]}]}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"orderId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"paymentLink"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:377}};t.loc.source={body:"mutation createOrder(\n $productId: ID!,\n $courseId: ID!, \n $batchId: ID!\n ) {\n createOrder(\n orderInput: {\n orderItems: [\n {\n productId: $productId\n selectedBatches: [\n { \n courseId: $courseId,\n batchId: $batchId\n }\n ]\n }\n ]\n }\n ) {\n orderId\n paymentLink\n }\n}",name:"GraphQL request",locationOffset:{line:1,column:1}};var l={};function i(e,t){for(var l=0;l<e.definitions.length;l++){var i=e.definitions[l];if(i.name&&i.name.value==t)return i}}t.definitions.forEach(function(e){if(e.name){var t=new Set;(function e(t,l){if("FragmentSpread"===t.kind)l.add(t.name.value);else if("VariableDefinition"===t.kind){var i=t.type;"NamedType"===i.kind&&l.add(i.name.value)}t.selectionSet&&t.selectionSet.selections.forEach(function(t){e(t,l)}),t.variableDefinitions&&t.variableDefinitions.forEach(function(t){e(t,l)}),t.definitions&&t.definitions.forEach(function(t){e(t,l)})})(e,t),l[e.name.value]=t}}),e.exports=t,e.exports.createOrder=function(e,t){var n={kind:e.kind,definitions:[i(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=l[t]||new Set,s=new Set,d=new Set;for(a.forEach(function(e){d.add(e)});d.size>0;){var o=d;d=new Set,o.forEach(function(e){s.has(e)||(s.add(e),(l[e]||new Set).forEach(function(e){d.add(e)}))})}return s.forEach(function(t){var l=i(e,t);l&&n.definitions.push(l)}),n}(t,"createOrder")},28992:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/active-icon.a30676cc.png",height:68,width:86,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAALVBMVEWq2v07qvq14P6l2f2f1/1Ntf1ku/m64v/D7f+f1f2y3v9lvPx2xP0Jl/4VnP5c/h89AAAAB3RSTlP+/fxGT/yE0og40wAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAC9JREFUeJw1xLkRACAMAzDnwyQB9h+Xo0CFICLD3A2ZmA/IikhVFPPsxQKJ7vd3AR16AQWIVUvvAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:6}},99509:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/expire-icon.42c9a910.png",height:45,width:57,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAJFBMVEX9xaX92rz/unjpmm7/xZD/yar/y6//zq7/27zzr4rfg1DbfEeY/aVaAAAABXRSTlP7Sv38hObm1q8AAAAJcEhZcwAAEJwAABCcASbNOjQAAAAuSURBVHicFchBEsAgDAMxJ7A2of//bwcdpe7eVVVKch7ZrCUQ1v0mvJnBliAB/RifAPj/Wy28AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:6}},81095:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/expire.9605709d.png",height:114,width:168,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAHlBMVEX/AAD/AAD/AAD/AAD/AAD/AAD/AABMaXH/AAD/AABPhLxpAAAACnRSTlNIY28OglU3AB49gIltqQAAAAlwS
1FlzAAAWJQAAFiUBSVIk8AAAACdJREFUeJwFwYEBADAIwrACOvX/h5cwOeAtoWnZSKUqC9uAwr4+yHwKfQB2XONhwQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:5}},6771:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/notFound.8a66dcef.png",height:246,width:320,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAb1BMVEW42a3c4eRVtP/L4u+/3uSWyemT0vZuxfz9skSl3f20zuaS1Pzj8eq0qoro27eCwent2ajE19Ov5/+33PNQvP86sv+MwOWC0fus2fLS6Pe+z+DR8P/2xGyr4P+e3f9nwv//0Wj5//+62PNYwf/p/v/i6GhdAAAAIHRSTlMJ/h37Xev5Yy7O/mwlGJb77vxA0KE52PE+Z/Ktsv2S29oPw44AAAAJcEhZcwAACxMAAAsTAQCanBgAAAA8SURBVHicBcGHAYAgEACxA4EHG/bedf8ZTcAXzao14HMTzlfoO8nCtx/I6JY0UYapvdVTXxvzYF20VfkDRQICzFnGbMEAAAAASUVORK5CYII=",blurWidth:8,blurHeight:6}},5969:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let i={src:"https://assets.madeeasy.in/prod/_next/static/media/notebook.43900753.png",height:92,width:92,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAS1BMVEVMaXEditUas/9vyf//8PAcxv8Ovf8Yt/4Zt/5YzP4Isv8XrPQkkdyH0PIWn9xQsPVao//auqzc0MoShNIzw/8Sxv8c0f+J3f8Wtf/GB5oSAAAAFHRSTlMAtTneBf3+fXP++VC5+cjgzP38t+xpc98AAAAJcEhZcwAAFiUAABYlAUlSJPAAAAA/SURBVHicNctJDoAwDMBAF0jSFMoalv+/FBWJ2xxsGC1n64BJVM8VSFGr9wMcvm93Qwr3WBqeUnT+YpHL4N9fSGgB/NMBOnYAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},75042:(e,t,l)=>{"use strict";l.d(t,{A:()=>A});var i=l(74848);l(96540);var n=l(5556),a=l.n(n),s=l(29965),d=l.n(s),o=l(6771);let r={src:"https://assets.madeeasy.in/prod/_next/static/media/study-nodata.8cbe61ca.png",height:228,width:288,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAAV1BMVEUAcpYDV5zk7vWbwNnI3fDL5vb1/f/7///X5/PH2+vX7vvK5vfd8PvY4Oro8fnP2eLh0tPf8fudyO3F7//Qz9bz+f7p9f3d//+xzOOpx9/k4OPu//+x1fZCqF2dAAAAGXRSTlMBjP3x/iqm/v1fxuVEpf6Qz6n5Yf38hQ+8/KPLKQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAADZJREFUeJwFwYUBwDAMBLELvl1m3n/OSgAhAJS5plSPk/WVdqnDvyVHs4bp2aKGu6W3fI3u5QcrLAHqFUjfeAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:6},c={src:"https://assets.madeeasy.in/prod/_next/static/media/futureDateBanner.5c389c7d.png",height:264,width:324,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAARVBMVEVMaXGx5P+74/1arvKm0/ni8fxjsPCv4P7n+P6q///+/v7H4/jt9v+97f91ufCk2Put1vWHx/ZYqu2w5v9nt/fW7P/s//+RXHX8AAAAE3RSTlMAwoTpqFqY3nYDB1M6yPf4a96EuH6OZQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAADhJREFUeJwVxscRwCAQBMHB3iEvLZB/qCpe3TTK2GkAeeYFtV+9rgTdCsD3SjqBlMwsAk9093JsPzC5AZospaLXAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:7};function u(e){let{noMsg:t,pageType:l,tagName:n,nofoundMsg:a,buttonText:s,onButtonClick:u,buttonClassName:A}=e,m=!!(s&&u);return(0,i.jsx)("div",{className:"flex justify-center items-center bg-white h-full w-full border border-[#B8E5FF]",children:"Study Plan"!==l?(0,i.jsxs)("div",{className:"text-red-600 text-center py-6 px-2 bg-white rounded-md w-full flex justify-center items-center flex-col",children:[(0,i.jsx)(d(),{width:140,height:160,src:a||o.A,className:"inline-block mb-2 lg:w-40 w-36",alt:"NoCourseFound"}),(0,i.jsx)("h3",{className:"text-lg font-semibold text-[#334155]",children:"No Data Found!"}),(0,i.jsx)("p",{className:"text-sm font-normal text-[#334155]",children:t}),m&&(0,i.jsx)("button",{type:"button",onClick:u,className:A||"mt-3 bg-[#0267B1] text-white text-xs font-semibold px-4 py-2 rounded-lg hover:bg-[#025a9a] active:bg-[#024f8a] transition-colors",children:s})]}):(0,i.jsx)("div",{children:"FutureDate"===n?(0,i.jsxs)("div",{className:"text-red-600 text-center py-6 flex justify-center items-center flex-col",children:[(0,i.jsx)(d(),{width:500,height:500,src:c,className:"inline-block mb-2 lg:w-40 w-36",alt:"future Date"}),(0,i.jsx)("div",{children:(0,i.jsx)("p",{className:"text-sm font-normal text-[#334155]",children:t})})]}):(0,i.jsxs)("div",{className:"text-red-600 text-center py-6 flex justify-center items-center flex-col",children:[(0,i.jsx)(d(),{width:500,height:500,src:r,className:"inline-block mb-2 lg:w-40 w-36",alt:"NoCourseFound"}),(0,i.jsx)("h3",{className:"text-lg font-semibold text-[#334155]",children:"Oops!"}),(0,i.jsx)("div",{children:(0,i.jsxs)("p",{className:"text-sm font-normal text-[#334155]",children:[t," "]})})]})})})}
1u.propTypes={noMsg:a().any,tagName:a().string,nofoundMsg:a().any,pageType:a().string,buttonText:a().string,onButtonClick:a().func,buttonClassName:a().string};let A=u},18810:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var i=l(74848);l(96540);var n=l(5556),a=l.n(n);function s(e){let{className:t="",children:l,...n}=e,a="sticky top-0 ".concat(t).trim();return(0,i.jsx)("div",{className:a,...n,children:l})}s.propTypes={children:a().any.isRequired,className:a().any.isRequired};let d=s},13469:(e,t,l)=>{"use strict";l.d(t,{A:()=>E});var i=l(74848),n=l(5556),a=l.n(n),s=l(96540),d=l(29965),o=l.n(d),r=l(91106),c=l.n(r),u=l(86715),A=l(95420),m=l(28992),v=l(99509),x=l(81095),p=l(5969),h=l(75042),f=l(34247),g=l(18500),b=l(95072),C=l.n(b),k=l(98271),w=l(19702),y=l(27736),j=l(26471),N=l(73305),F=l(67547),S=l(41859),T=l(94350);let I={src:"https://assets.madeeasy.in/prod/_next/static/media/date-time-icon.db5109a4.png",height:36,width:36,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAXVBMVEUICQoAAAAAAAAyPUUBAQOWu9AAAAANEBICAgIECAiOscICAgJlfYtvi5tvi5sAAAAAAADV//8AAAAbISRMaXGEpbcAAAB2k6RrhZWr1exwi5x/nbCStseNr8F+na78xO1gAAAAHHRSTlNmSWF+Kf5RPncQ2JCh/al/bG8CVAD0HPTDt+SGcyvWdgAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAERJREFUeJwFwQUCwCAMBLBDSltkMDfY/5+5BF6gAr8BPN0XB0V9iWiyivSUMnYsaHHQF1eg5bP32STU4LITE3B4ryyWf2dJAtvO53HIAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8};function D(e){let{isOpen:t,onGoBack:l,onProceed:n,linkIdPopup:a}=e;return t?(0,i.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:(0,i.jsxs)("div",{className:"relative w-full max-w-md rounded-lg bg-white p-6 shadow-lg",children:[(0,i.jsx)("button",{onClick:l,type:"button",className:"absolute right-4 top-4 text-gray-400 hover:text-gray-600",children:"â"}),(0,i.jsx)("h2",{className:"mb-3 text-center text-xl font-semibold text-gray-900",children:"Before You Continue"}),(0,i.jsx)("p",{className:"mb-6 text-center text-sm text-gray-600",children:"Please proceed only if you have not already attempted this test at the centre, to avoid conflicts in result processing or possible data loss."}),(0,i.jsxs)("div",{className:"flex gap-4",children:[(0,i.jsx)("button",{type:"button",onClick:l,className:"w-1/2 rounded-md border border-gray-300 py-2 text-xs font-medium text-gray-700 hover:bg-gray-100",children:"Go Back"}),(0,i.jsx)("button",{type:"button",onClick:()=>n(a),className:"w-1/2 rounded-md bg-customBlue py-2 text-xs font-medium text-white hover:bg-blue-700",children:"Proceed with Online Attempt"})]})]})}):null}function B(e){let{myCourseData:t,tagName:l,handleEMIPay:n,openBatch:a,isProfile:d,pageType:r,mode:b,batchId:B,attemptFilter:E=""}=e,[V]=(0,s.useState)({Offline:"bg-[#E3EAFF] text-[#002FFF]",Hybrid:"bg-[#DFF4CE] text-[#264909]",Online:"bg-[#DFF4CE] text-[#264909]",Weekend:"bg-[#FFEFCC] text-[#AA6311]"});console.log("isFinalSubmissionDatePassed",t);let{miscellaneousData:M}=(0,T.aY)(),L=(0,f.cC)(null==M?void 0:M.hostname),[P,O]=(0,s.useState)(!1),H=(0,u.useRouter)(),{showToast:U}=(0,s.useContext)(k.$),{user:R}=(0,j.Jd)(),J="";"unattempted"===E?J="No unattempted tests found.":"attempted"===E&&(J="No attempted tests found.");let Z=e=>{let t=Math.floor(e/60);return e%60>50?"".concat(t+1):"".concat(t)};(0,s.useEffect)(()=>{(0,w.sx)(y.A.TESTSERIES_LIST_VIEWED,{timestamp:new Date().getTime(),screenName:"MockTest list"})},[]);let[W,z]=(0,s.useState)(!1),[Q,G]=(0,s.useState)([]),[Y,q]=(0,s.useState)(),[_,K]=(0,s.useState)(),[X,$]=(0,s.useState)(),ee=(e,t,l,i)=>{z(!0),G(e),q(t),K(l),$(i)},[et,el]=(0,s.useState)(),[ei,{error:en,loading:ea}]=(0,A.n)(C()),es=async(e,t)=>{try{var l,i,n,a;let s=await ei({variables:{batchId:B,linkId:e}});console.log("test",s),(null==s?void 0:null===(i=s.data)||void 0===i?void 0:null===(l=i.initBatchMockTest)||void 0===l?void 0:l.success)?void 0!==t&&"SubjectiveTest"!==t||void 0!==et&&"SubjectiveTest"!==et?H.push("/attempt-mocktest?linkId=".concat(e)):H.push("/subjective-mocktest?linkId=".concat(e)):U(null==s?void 0:null===(a=s.data)||void 0===a?void 0:null===(n=a.initBatchMockTest)||void 0===n?void 0:n.message)}catch(e){console.error("Error:",e)}}
1,[ed,eo]=(0,s.useState)(!1),[er,ec]=(0,s.useState)(),[eu,eA]=(0,s.useState)(),em=(e,t,l,i)=>{if("completed"===l)localStorage.removeItem("currentPageName"),H.push("/mock-test-result?linkId=".concat(t));else if(e&&(null==i?void 0:i.subType)!=="SubjectiveTest")"nextias"===L.organizationName&&"unattempted"===l?(eo(!0),ec(e)):O(!0),el(null==i?void 0:i.subType),eA(t);else{let e=(null==i?void 0:i.subType)==="SubjectiveTest";e?(0,w.sx)(y.A.MOCK_TEST_STARTED,{timestamp:new Date().getTime(),mockTestId:t,mockTestTitle:null==i?void 0:i.name,testType:null==i?void 0:i.type,mockStatus:l,acountId:null==R?void 0:R.id,screenName:"MockTest Attempt",linkID:t}):((0,w.sx)(y.A.MOCK_TEST_INITIATED,{timestamp:new Date().getTime(),mockTestId:t,mockTestTitle:null==i?void 0:i.name,testType:(null==i?void 0:i.isFreeMockTest)?"Free":null==i?void 0:i.type,mockStatus:l,acountId:null==R?void 0:R.id,screenName:"MockTest Attempt",linkID:t}),localStorage.setItem("currentPageName","mockTestAttempt")),"nextias"!==L.organizationName||e||"unattempted"!==l?es(t,null==i?void 0:i.subType):(eo(!0),el(null==i?void 0:i.subType),eA(t))}},ev=e=>{eo(!1),e&&"SubjectiveTest"!==et?"nextias"===L.organizationName&&O(!0):es(eu,et)};return(0,i.jsxs)("div",{children:[(null==t?void 0:t.length)>0?null==t?void 0:t.map(e=>{var t,n,a,s,d,u,A,h,g,C,k,w,y,j,N,F,S,T,D,B,E,M,L,P,O,H,R,J,W,z;let Q=(0,f.r6)(null==e?void 0:e.liveAt),G=(0,f.r6)(null==e?void 0:null===(t=e.mockTestLink)||void 0===t?void 0:t.finalSubmissionAt);return(0,i.jsx)("div",{className:"lg:mb-6 mb-[14px] ".concat("Active"!==l?"lg:mt-[30px] mt-5":""),children:(0,i.jsxs)("div",{className:"border border-[#B8E5FF] bg-[#FDFDFD] rounded-lg",children:[(0,i.jsxs)("div",{className:"".concat("Details"!==r&&"StudyMaterial"!==r?"items-start":"lg:items-center item-start"," lg:p-[18px] p-[10px] flex "),children:[(0,i.jsxs)("div",{className:"relative overflow-hidden",children:["Details"===r&&!(null===(R=null==e?void 0:null===(n=e.mockTestLink)||void 0===n?void 0:n.isFinalSubmissionDatePassed)||void 0===R||R)&&(null!==(J=null==e?void 0:null===(s=e.mockTestLink)||void 0===s?void 0:null===(a=s.attemptInfo)||void 0===a?void 0:a.attemptStatus)&&void 0!==J?J:"")!=="completed"&&(0,i.jsx)("div",{className:"".concat((null==e?void 0:null===(d=e.mockTestLink)||void 0===d?void 0:d.isStarted)?"bg-[#88BF5D] after:border-t-[#6E994C] before:border-b-[#6E994C]":"bg-[#FF9000] after:border-t-[#955A0D] before:border-b-[#955A0D]"," ").concat("Offline"===b?"hidden":""," text-white lg:text-[8px] text-[7px] font-semibold px-2 py-[2px] rotate-[-45deg] origin-top-left shadow-md absolute lg:top-[42px] top-[39px] lg:left-[-18px] left-[-20px] lg:w-[82px] w-[80px] text-center after:content-[''] after:absolute after:top-full after:-translate-x-1/2 after:border-l-[6.5px] after:border-r-[4.5px] after:border-t-[6px] after:border-l-transparent after:left-3 after:border-r-transparent before:content-[''] before:absolute before:bottom-[-5px] before:right-[-3px] before:rotate-180 before:-translate-x-1/2\n before:border-l-[6.5px] before:border-r-[6.5px] before:border-b-[6px]\n before:border-l-transparent before:border-r-transparent "),children:(null==e?void 0:null===(u=e.mockTestLink)||void 0===u?void 0:u.isStarted)?"Active":"Upcoming"}),(0,i.jsx)("div",{className:"".concat("Active"===l?"bg-[#ECF7FF]":"bg-[#FFF6EC]"," lg:p-4 p-[14px] lg:rounded-xl rounded-md me-3 "),children:"StudyMaterial"===r?(0,i.jsx)(o(),{src:p.A,alt:"icon",className:"lg:w-[46px] lg:h-[33px] w-[41px] h-[23px]",width:43,height:34}):(0,i.jsx)(o(),{src:"Active"===l?m.A:v.A,alt:"icon",className:"lg:w-[46px] lg:h-[33px] w-[41px] h-[23px]",width:43,height:34})})]}),(0,i.jsx)("div",{className:"w-full flex justify-between items-start",children:(0,i.jsxs)("div",{className:"".concat("Active"===l?"items-center":"items-start"," text-xs font-normal w-full"),children:[(0,i.jsx)("span",{className:"".concat("Details"!==r&&"StudyMaterial"!==r?"block":"hidden"," text-lightSky w-fit bg-lightSky px-[6px] py-[3px] rounded mr-2 line-clamp-1"),children:null==e?void 0:null===(A=e.exam)||void 0===A?void 0:A.name}),(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"lg:text-xl text-sm font-semibold text-darknight ".concat((null==e||null===(h=e.accountBatches)||void 0===h||h.isEnrolled,"pb-[6px]")," leading-[normal]"),children:"StudyMaterial"!==r?null==e?void 0:e.name:null==e?void 0:e.title})}),"Active"===l?(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("span",{className:"bg-lightBlue lg:px-[6px] px-2 lg:py-[3px] py-px rounded text-[10px] font-normal",children:null==e?void 0:e.subType}),(0,i.jsx)("span",{className:"".concat(V[(null==e?void 0:e.courseMode)||b]," lg:px-[6px] px-2 lg:py-[3px] py-px rounded text-[10px] font-normal"),children:(null==e?void 0:e.courseMode)||b})]}):(0,i.jsx)(o(),{width:500,height:500,alt:"expire",className:"lg:w-[84px] lg:h-[57px] w-[54px] h-[37px]",src:x.A})]}),(0,i.jsxs)("div",{className:"".concat("Details"===r?"block":"hidden"," lg:text-base text-[10px] font-normal text-greyFont"),children:[(null==e?void 0:e.subType)==="SubjectiveTest"&&(0,i.jsx)("div",{className:"mb-0.5",children:(null==e?void 0:null===(C=e.mockTestLink)||void 0===C?void 0:null===(g=C.attemptInfo)||void 0===g?void 0:g.attemptStatus)!=="unattempted"&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("strong",{className:"font-medium",children:["Status:"," "]}),(null==e?void 0:e.mockTestLink)?(0,i.jsx)("span",{className:"lg:text-base text-[10px] font-light",children:"Evalution ".concat(null==e?void 0:null===(y=e.mockTestLink)||void 0===y?void 0:null===(w=y.attemptInfo)||void 0===w?void 0:null===(k=w.subjectiveTestAttempt)||void 0===k?void 0:k.evaluationStatus)}):"-"]})}),(0,i.jsxs)("div",{className:"lg:flex block",children:[(0,i.jsxs)("span",{className:"lg:mr-3 flex lg:justify-center items-center",children:[(0,i.jsx)(o(),{src:I,alt:"calender",className:"inline me-1 lg:w-4 lg:h-4 w-3 h-3",width:16,height:16}),(0,i.jsx)("strong",{className:"font-medium mr-1",children:"Available From
1:"})," ",null==Q?void 0:Q.date,(0,i.jsx)("span",{className:"relative pl-4 before:content-[''] before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:h-2 before:w-px lg:before:h-3 before:bg-slate-600",children:null==Q?void 0:Q.time})]}),(null==e?void 0:null===(j=e.mockTestLink)||void 0===j?void 0:j.finalSubmissionAt)&&(0,i.jsxs)("span",{className:"block",children:[(0,i.jsx)(o(),{src:I,alt:"calender",className:"inline me-1 lg:w-4 lg:h-4 w-3 h-3",width:16,height:16}),(0,i.jsx)("strong",{className:"font-medium mr-1",children:"Available Till:"})," ",null==G?void 0:G.date,(0,i.jsx)("span",{className:"relative pl-4 before:content-[''] before:absolute before:left-2 before:top-1/2 before:-translate-y-1/2 before:h-2 lg:before:h-3 before:w-px before:bg-slate-600",children:null==G?void 0:G.time})]})]})]})]})})]}),(0,i.jsx)("div",{className:"w-full flex justify-between items-center bg-[#F2FBFF8C] border-t border-formFieldBlue lg:p-[18px] p-[10px]",children:(0,i.jsxs)("div",{className:"flex justify-between items-center w-full",children:["StudyMaterial"!==r?(0,i.jsx)("div",{className:"".concat("Active"===l?"block":"hidden"),children:((null==e?void 0:e.duration)||(null==e?void 0:e.questionCount))&&(0,i.jsxs)("ul",{className:"lg:flex text-greyFont",children:[(0,i.jsxs)("li",{className:"flex items-center pe-3 lg:mb-0 mb-1",children:[(0,i.jsx)("span",{className:"lg:pe-2 pe-1",children:(0,i.jsxs)("svg",{className:"lg:w-[18px] lg:h-5 w-4 h-4",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsxs)("g",{clipPath:"url(#clip0_17723_10993)",children:[(0,i.jsx)("path",{d:"M5.61523 9.46165C5.61516 10.3708 5.79418 11.271 6.14207 12.111C6.48996 12.9509 6.99989 13.7141 7.64277 14.357C8.28564 14.9998 9.04886 15.5098 9.88884 15.8577C10.7288 16.2057 11.6291 16.3847 12.5383 16.3847C13.4475 16.3847 14.3478 16.2057 15.1878 15.8577C16.0278 15.5098 16.791 14.9998 17.4339 14.357C18.0767 13.7141 18.5867 12.9509 18.9346 12.111C19.2824 11.271 19.4615 10.3708 19.4614 9.46165C19.4615 8.55253 19.2824 7.65229 18.9346 6.81235C18.5867 5.9724 18.0767 5.2092 17.4339 4.56633C16.791 3.92345 16.0278 3.4135 15.1878 3.06557C14.3478 2.71765 13.4475 2.53857 12.5383 2.53857C11.6291 2.53857 10.7288 2.71765 9.88884 3.06557C9.04886 3.4135 8.28564 3.92345 7.64277 4.56633C6.99989 5.2092 6.48996 5.9724 6.14207 6.81235C5.79418 7.65229 5.61516 8.55253 5.61523 9.46165Z",fill:"#B8E5FF"}),(0,i.jsx)("path",{d:"M11 1C5.486 1 1 5.486 1 11C1 16.514 5.486 21 11 21C16.514 21 21 16.514 21 11C21 5.486 16.514 1 11 1ZM11 20.3333C5.85367 20.3333 1.66667 16.1463 1.66667 11C1.66667 5.85367 5.85367 1.66667 11 1.66667C16.1463 1.66667 20.3333 5.85367 20.3333 11C20.3333 16.1463 16.1463 20.3333 11 20.3333Z",fill:"black"}),(0,i.jsx)("path",{d:"M10.9997 3C10.8157 3 10.6663 3.149 10.6663 3.33333V11H5.66634C5.48234 11 5.33301 11.149 5.33301 11.3333C5.33301 11.5177 5.48234 11.6667 5.66634 11.6667H10.9997C11.1837 11.6667 11.333 11.5177 11.333 11.3333V3.33333C11.333 3.149 11.1837 3 10.9997 3Z",fill:"black"})]}),(0,i.jsx)("defs",{children:(0,i.jsx)("clipPath",{id:"clip0_17723_10993",children:(0,i.jsx)("rect",{width:"20",height:"20",fill:"white",transform:"translate(1 1)"})})})]})}),(0,i.jsxs)("span",{className:"lg:text-sm text-xs font-normal",children:[Z(null!==(W=null==e?void 0:e.duration)&&void 0!==W?W:0)," ","Mins"]})]}),(0,i.jsxs)("li",{className:"".concat((null==e?void 0:e.questionCount)>0?"block":"hidden"," flex items-center"),children:[(0,i.jsx)("span",{className:"lg:pe-2 pe-1",children:(0,i.jsxs)("svg",{className:"lg:w-[18px] lg:h-5 w-4 h-4",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M1.81152 11.4045C1.81146 12.2436 1.97669 13.0745 2.29778 13.8498C2.61887 14.625 3.08954 15.3294 3.6829 15.9228C4.27626 16.5162 4.9807 16.9869 5.75598 17.308C6.53127 17.6291 7.36222 17.7944 8.20139 17.7944C9.04057 17.7944 9.87152 17.6291 10.6468 17.308C11.4221 16.9869 12.1265 16.5162 12.7199 15.9228C13.3132 15.3294 13.7839 14.625 14.105 13.8498C14.4261 13.0745 14.5913 12.2436 14.5913 11.4045C14.5913 10.5654 14.4261 9.73451 14.105 8.95926C13.7839 8.18401 13.3132 7.47959 12.7199 6.88623C12.12
165 6.29287 11.4221 5.82219 10.6468 5.50106C9.87152 5.17993 9.04057 5.01465 8.20139 5.01465C7.36222 5.01465 6.53127 5.17993 5.75598 5.50106C4.9807 5.82219 4.27626 6.29287 3.6829 6.88623C3.08954 7.47959 2.61887 8.18401 2.29778 8.95926C1.97669 9.73451 1.81146 10.5654 1.81152 11.4045Z",fill:"#B8E5FF"}),(0,i.jsx)("path",{d:"M1.51616 19.3073H13.8376C14.4041 19.3073 14.8651 18.8598 14.8651 18.31V5.67816C14.8651 5.66287 14.8582 5.64957 14.8562 5.63494C14.8541 5.62032 14.8514 5.60769 14.8473 5.59373C14.8315 5.53655 14.8062 5.48336 14.7637 5.44281L9.96952 0.789625C9.92774 0.74907 9.87294 0.724471 9.81403 0.708515C9.79965 0.704526 9.78663 0.701867 9.77156 0.699873C9.75718 0.698543 9.74348 0.691895 9.72772 0.691895H1.51205C0.943516 0.691895 0.480469 1.13933 0.480469 1.68915V18.31C0.480469 18.8598 0.944886 19.3073 1.51616 19.3073ZM10.0702 1.82677L13.6958 5.34574H10.4127C10.2243 5.34574 10.0702 5.19682 10.0702 5.01332V1.82677ZM1.16545 1.68915C1.16545 1.50565 1.32094 1.35673 1.51205 1.35673H9.38523V5.01332C9.38523 5.56314 9.84622 6.01058 10.4127 6.01058H14.1801V18.31C14.1801 18.4935 14.026 18.6424 13.8376 18.6424H1.51616C1.32231 18.6424 1.16545 18.4935 1.16545 18.31V1.68915Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 8.42081H12.1457C12.3515 8.42081 12.5185 8.28181 12.5185 8.11055C12.5185 7.93929 12.3515 7.80029 12.1457 7.80029H3.19895C2.99318 7.80029 2.82617 7.93929 2.82617 8.11055C2.82617 8.28181 2.99318 8.42081 3.19895 8.42081Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 10.9027H12.1457C12.3515 10.9027 12.5185 10.7637 12.5185 10.5925C12.5185 10.4212 12.3515 10.2822 12.1457 10.2822H3.19895C2.99318 10.2822 2.82617 10.4212 2.82617 10.5925C2.82617 10.7637 2.99318 10.9027 3.19895 10.9027Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.17233 5.93838H6.63386C6.82494 5.93838 6.98002 5.79939 6.98002 5.62813C6.98002 5.45687 6.82494 5.31787 6.63386 5.31787H3.17233C2.98125 5.31787 2.82617 5.45687 2.82617 5.62813C2.82617 5.79939 2.98125 5.93838 3.17233 5.93838Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 13.3852H12.1457C12.3515 13.3852 12.5185 13.2462 12.5185 13.0749C12.5185 12.9036 12.3515 12.7646 12.1457 12.7646H3.19895C2.99318 12.7646 2.82617 12.9036 2.82617 13.0749C2.82617 13.2462 2.99318 13.3852 3.19895 13.3852Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 15.8676H12.1457C12.3515 15.8676 12.5185 15.7286 12.5185 15.5573C12.5185 15.3861 12.3515 15.2471 12.1457 15.2471H3.19895C2.99318 15.2471 2.82617 15.3861 2.82617 15.5573C2.82617 15.7286 2.99318 15.8676 3.19895 15.8676Z",fill:"#0F0F0F"})]})}),(0,i.jsxs)("span",{className:"lg:text-sm text-xs font-normal",children:[null!==(z=null==e?void 0:e.questionCount)&&void 0!==z?z:0," ","Questions"]})]})]})}):(0,i.jsx)("ul",{className:"flex",children:(0,i.jsxs)("li",{className:"flex items-center pe-3",children:[(0,i.jsx)("span",{children:(0,i.jsxs)("svg",{width:"15",height:"20",viewBox:"0 0 15 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("path",{d:"M1.81152 11.4045C1.81146 12.2436 1.97669 13.0745 2.29778 13.8498C2.61887 14.625 3.08954 15.3294 3.6829 15.9228C4.27626 16.5162 4.9807 16.9869 5.75598 17.308C6.53127 17.6291 7.36222 17.7944 8.20139 17.7944C9.04057 17.7944 9.87152 17.6291 10.6468 17.308C11.4221 16.9869 12.1265 16.5162 12.7199 15.9228C13.3132 15.3294 13.7839 14.625 14.105 13.8498C14.4261 13.0745 14.5913 12.2436 14.5913 11.4045C14.5913 10.5654 14.4261 9.73451 14.105 8.95926C13.7839 8.18401 13.3132 7.47959 12.7199 6.88623C12.1265 6.29287 11.4221 5.82219 10.6468 5.50106C9.87152 5.17993 9.04057 5.01465 8.20139 5.01465C7.36222 5.01465 6.53127 5.17993 5.75598 5.50106C4.9807 5.82219 4.27626 6.29287 3.6829 6.88623C3.08954 7.47959 2.61887 8.18401 2.29778 8.95926C1.97669 9.73451 1.81146 10.5654 1.81152 11.4045Z",fill:"#B8E5FF"}),(0,i.jsx)("path",{d:"M1.51616 19.3073H13.8376C14.4041 19.3073 14.8651 18.8598 14.8651 18.31V5.67816C14.8651 5.66287 14.8582 5.64957 14.8562 5.63494C14.8541 5.62032 14.8514 5.60769 14.8473 5.59373C14.8315 5.53655 14.8062 5.48336 14.7637 5.44281L9.96952 0.789625C9.92774 0.74907 9.87294 0.724471 9.81403 0.708515C9.79965 0.704526 9.78663 0.701867 9.77156 0.699873C9.75718 0.698543 9.74348 0.691895 9.72772 0.691895
1H1.51205C0.943516 0.691895 0.480469 1.13933 0.480469 1.68915V18.31C0.480469 18.8598 0.944886 19.3073 1.51616 19.3073ZM10.0702 1.82677L13.6958 5.34574H10.4127C10.2243 5.34574 10.0702 5.19682 10.0702 5.01332V1.82677ZM1.16545 1.68915C1.16545 1.50565 1.32094 1.35673 1.51205 1.35673H9.38523V5.01332C9.38523 5.56314 9.84622 6.01058 10.4127 6.01058H14.1801V18.31C14.1801 18.4935 14.026 18.6424 13.8376 18.6424H1.51616C1.32231 18.6424 1.16545 18.4935 1.16545 18.31V1.68915Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 8.42081H12.1457C12.3515 8.42081 12.5185 8.28181 12.5185 8.11055C12.5185 7.93929 12.3515 7.80029 12.1457 7.80029H3.19895C2.99318 7.80029 2.82617 7.93929 2.82617 8.11055C2.82617 8.28181 2.99318 8.42081 3.19895 8.42081Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 10.9027H12.1457C12.3515 10.9027 12.5185 10.7637 12.5185 10.5925C12.5185 10.4212 12.3515 10.2822 12.1457 10.2822H3.19895C2.99318 10.2822 2.82617 10.4212 2.82617 10.5925C2.82617 10.7637 2.99318 10.9027 3.19895 10.9027Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.17233 5.93838H6.63386C6.82494 5.93838 6.98002 5.79939 6.98002 5.62813C6.98002 5.45687 6.82494 5.31787 6.63386 5.31787H3.17233C2.98125 5.31787 2.82617 5.45687 2.82617 5.62813C2.82617 5.79939 2.98125 5.93838 3.17233 5.93838Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 13.3852H12.1457C12.3515 13.3852 12.5185 13.2462 12.5185 13.0749C12.5185 12.9036 12.3515 12.7646 12.1457 12.7646H3.19895C2.99318 12.7646 2.82617 12.9036 2.82617 13.0749C2.82617 13.2462 2.99318 13.3852 3.19895 13.3852Z",fill:"#0F0F0F"}),(0,i.jsx)("path",{d:"M3.19895 15.8676H12.1457C12.3515 15.8676 12.5185 15.7286 12.5185 15.5573C12.5185 15.3861 12.3515 15.2471 12.1457 15.2471H3.19895C2.99318 15.2471 2.82617 15.3861 2.82617 15.5573C2.82617 15.7286 2.99318 15.8676 3.19895 15.8676Z",fill:"#0F0F0F"})]})}),(0,i.jsxs)("span",{className:"text-sm font-normal ps-2",children:[null==e?void 0:e.pageCount," ","Pages"]})]})}),"StudyMaterial"!==r?(0,i.jsx)(i.Fragment,{children:"Active"===l?(0,i.jsx)("div",{className:"",children:"Offline"!==b?(0,i.jsx)("button",{type:"button",disabled:(null==e?void 0:e.mockTestLink)===null||!(null==e?void 0:null===(N=e.accessInfo)||void 0===N?void 0:N.isPlayable),onClick:()=>{var t,l,i,n,a,s,d;if(!(null==e?void 0:null===(t=e.accessInfo)||void 0===t?void 0:t.isPlayable)){U(null==e?void 0:null===(d=e.accessInfo)||void 0===d?void 0:d.message);return}if(!(null==e?void 0:null===(l=e.mockTestLink)||void 0===l?void 0:l.isStarted)){U("This test is not yet available. Please check back after the start date.");return}em(null==e?void 0:null===(i=e.mockTestLink)||void 0===i?void 0:i.isFinalSubmissionDatePassed,null==e?void 0:null===(n=e.mockTestLink)||void 0===n?void 0:n.id,null==e?void 0:null===(s=e.mockTestLink)||void 0===s?void 0:null===(a=s.attemptInfo)||void 0===a?void 0:a.attemptStatus,e)},className:"".concat((null==e?void 0:null===(F=e.mockTestLink)||void 0===F?void 0:F.isStarted)&&(null==e?void 0:null===(S=e.accessInfo)||void 0===S?void 0:S.isPlayable)?"bg-[#045692] cursor-pointer":"bg-[#9D9D9D] cursor-not-allowed"," text-white rounded-[6px] lg:py-[10px] py-2 flex justify-center items-center text-xs lg:text-sm ml-auto lg:w-32 w-[115px]"),children:(null==e?void 0:null===(D=e.mockTestLink)||void 0===D?void 0:null===(T=D.attemptInfo)||void 0===T?void 0:T.attemptStatus)==="completed"?"View Result":(null==e?void 0:null===(E=e.mockTestLink)||void 0===E?void 0:null===(B=E.attemptInfo)||void 0===B?void 0:B.attemptStatus)==="unattempted"||(null==e?void 0:null===(L=e.mockTestLink)||void 0===L?void 0:null===(M=L.attemptInfo)||void 0===M?void 0:M.attemptStatus)==null?(null==e?void 0:null===(O=e.mockTestLink)||void 0===O?void 0:null===(P=O.attemptInfo)||void 0===P?void 0:P.showAnswerSheetUploadDatePassed)&&(null==e?void 0:e.subType)==="SubjectiveTest"?"View":"Start Test":(null==e?void 0:e.subType)!=="SubjectiveTest"?"Resume":"View Summary"}):(()=>{var t,l,n;let a=!((null==e?void 0:null===(t=e.mockTestLink)||void 0===t?void 0:t.isResultDeclared)&&(null==e?void 0:null===(n=e.mockTestLink)||void 0===n?void 0:null===(l=n.attemptInfo)||void 0===l?void 0:l.attemptStatus)==="completed");return(0,i.jsx)("button",{type:"button",onClick:()=>{var t,l,i,n,a,s;return(null==e?void 0:null===(l=e.mockTestLink)||void 0===l?void 0:null===(t=l.attemptInfo)||void 0===t?void 0:t.attemptStatus)!=="completed"?U("This test isnât available yet. You can attempt it offline once the start date arrives."):em(null==e?void 0:null===(i=e.mockTestLink)||void 0===i?void 0:i.isFinalSubmissionDatePassed,null==e?void 0:null===(n=e.mockTestLink)||void 0===n?void 0:n.id,null==e?void 0:null===(s=e.mockTestLink)||void 0===s?void 0:null===(a=s.attemptInfo)||void 0===a?void 0:a.attemptStatus)},className:"".concat(a?"bg-[#9D9D9D] cursor-not-allowed":"bg-[#045692]"," text-white rounded-[6px] px-3 lg:py-3 py-[9px] flex justify-center items-center text-xs lg:text-sm ml-auto"),children:"View Result"})})()}):(0,i.jsx)("div",{className:"flex justify-between w-full items-center",children:(null==e?void 0:null===(H=e.addOnPurchaseOptions)||void 0===H?void 0:H.length)>0?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("p",{className:"font-medium text-sm lg:text-lg",children:["Test Series access expired. Tap"," "," ",(0,i.jsx)("strong",{className:"text-customBlue",children:"'Extend Validity'"})," ","to unlock again"]}),(0,i.jsx)("div",{onClick:()=>{var t,l;return ee(null==e?void 0:e.addOnPurchaseOptions,null==e?void 0:e.id,null==e?void 0:null===(l=e.accountBatches)||void 0===l?void 0:null===(t=l.enrolledBatch)||void 0===t?void 0:t.id,null==e?void 0:e.name)},className:"bg-[#045692] text-white rounded-[6px] cursor-pointer lg:py-3 py-[9px] px-6 flex justify-center items-center lg:w-[16%] w-[33
1%] text-xs lg:text-sm whitespace-nowrap",children:"Extend Validity"})]}):(0,i.jsx)("p",{className:"font-medium text-sm lg:text-lg",children:"Test Series access expired."})})}):(0,i.jsx)(c(),{href:null==e?void 0:e.url,target:"_blank",className:"bg-[#045692] text-white rounded-[6px] cursor-pointer lg:py-3 py-[9px] flex justify-center items-center lg:w-[12%] w-[30%] text-xs lg:text-sm ml-auto",children:"View"})]})})]})},null==e?void 0:e.id)}):(0,i.jsx)("div",{className:"lg:h-[81vh] h-full",children:(0,i.jsx)(h.A,{pageType:"Study Plan",noMsg:J})}),P&&(0,i.jsx)(N.A,{isOpen:P,onClose:()=>O(!1),title:"Thank you!",Icon:g.A,linkIdPopup:eu,btnTitle:"Okay, I Understand",testInitaliz:es,message:"You are attempting after the active period. Your score will not be counted in the leaderboard."}),(0,i.jsx)(F.A,{showPopup:W,popupFor:"MyCourse",batchHeading:"Validity Extension",onPopupClose:()=>{z(!1)},divwidth:"lg:max-w-[710px] p-2 w-full !pb-5 lg:w-auto",messageData:(0,i.jsx)(S.default,{setTopUp:z,courseAddOnName:X,courseId:Y,addOnBatchId:_,selectedAddOnList:Q})}),ed&&(0,i.jsx)(D,{isOpen:ed,inkIdPopup:eu,actionTest:er,testInitaliz:es,onGoBack:()=>eo(!1),onProceed:()=>ev(er)})]})}B.propTypes={myCourseData:a().any.isRequired,tagName:a().any,handleEMIPay:a().any,openBatch:a().any,isProfile:a().any,pageType:a().any,mode:a().any,batchId:a().any,attemptFilter:a().string};let E=B},41859:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>m});var i=l(74848),n=l(96540),a=l(95420),s=l(5556),d=l.n(s),o=l(91130),r=l(760),c=l.n(r),u=l(98271);function A(e){var t;let{selectedAddOnList:l,courseId:s,addOnBatchId:d,setTopUp:r,courseAddOnName:A}=e,[m,v]=(0,n.useState)((null==l?void 0:null===(t=l[0])||void 0===t?void 0:t.id)||null),[x,p]=(0,n.useState)(null==l?void 0:l[0]),[h,f]=(0,n.useState)(!1),g=e=>{m===(null==e?void 0:e.id)?(v(null),p(null)):(v(null==e?void 0:e.id),p(e))},[b,{error:C,loading:k}]=(0,a.n)(c()),{showToast:w}=(0,n.useContext)(u.$),y=async e=>{f(!0);try{var t,l,i;let n=await b({variables:{productId:null==e?void 0:e.id,courseId:s,batchId:d}}),a=null==n?void 0:null===(l=n.data)||void 0===l?void 0:null===(t=l.createOrder)||void 0===t?void 0:t.paymentLink;a?window.open(a,"_blank"):w("Something went wrong â please try again"),f(!1),r(!1),console.log("Order created:",null==n?void 0:null===(i=n.errors)||void 0===i?void 0:i.message)}catch(e){w("Error creating order:",e),console.error("Error creating order:",e)}};return(0,i.jsxs)("div",{className:"",children:[(0,i.jsx)("h4",{className:"text-base font-medium text-black mb-6",children:A}),(0,i.jsx)(o.A,{className:"scrollbar-hide",children:(0,i.jsx)("div",{className:"gap-4 flex w-full pb-3 ".concat((null==l?void 0:l.length)>=2?"flex":"justify-center"),children:null==l?void 0:l.map(e=>{var t,l,n;return(0,i.jsxs)("div",{onClick:()=>g(e),className:"flex-flexAuto lg:w-[400px] w-full rounded-md lg:p-5 p-3 relative cursor-pointer transition-all duration-200 ".concat(m===(null==e?void 0:e.id)?"border border-[#009FF9] bg-[linear-gradient(359.42deg,_#FFFFFF_43.81%,_#C9E8FD_140.46%)] border-b-[5px] ":"border border-[#0000000F] bg-white"),children:[(0,i.jsx)("div",{className:"absolute top-0 left-0 right-0 mx-auto ".concat(m===(null==e?void 0:e.id)?"bg-[#708B9D]":"bg-[#0000008C]"," text-white text-[10px] font-medium px-3.5 py-1 w-[220px] rounded-bl-xl rounded-br-xl"),children:"Updated course validity- ".concat(function(e){let t=new Date;return t.setDate(t.getDate()+e),t.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})}(null==e?void 0:e.validForDays))}),(0,i.jsxs)("div",{className:"lg:flex gap-2 mb-4 justify-between items-center mt-8",children:[(0,i.jsxs)("div",{className:"flex items-center",children:[(0,i.jsx)("div",{className:"w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 ".concat(m===(null==e?void 0:e.id)?"":"bg-white border-2 border-gray-300"),children:m===(null==e?void 0:e.id)&&(0,i.jsx)("svg",{className:"lg:w-6 lg:h-6",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.93544 1.57707C10.4374 -0.525692 13.5626 -0.525692 15.0646 1.57707L15.3037 1.91184C15.568 2.28192 16.0119 2.48008 16.4638 2.42986L17.5296 2.31143
1C19.9283 2.04492 21.9551 4.0717 21.6886 6.47035L21.5702 7.53617C21.52 7.98816 21.7181 8.43198 22.0882 8.69632L22.423 8.93544C24.5257 10.4374 24.5257 13.5626 22.423 15.0646L22.0882 15.3037C21.7181 15.568 21.52 16.0119 21.5702 16.4638L21.6886 17.5296C21.9551 19.9283 19.9283 21.9551 17.5296 21.6886L16.4638 21.5702C16.0119 21.52 15.568 21.7181 15.3037 22.0882L15.0646 22.423C13.5626 24.5257 10.4375 24.5257 8.93544 22.423L8.69632 22.0882C8.43198 21.7181 7.98816 21.52 7.53616 21.5702L6.47035 21.6886C4.0717 21.9551 2.04492 19.9283 2.31143 17.5296L2.42986 16.4638C2.48008 16.0119 2.28192 15.568 1.91184 15.3037L1.57707 15.0646C-0.525692 13.5626 -0.525692 10.4375 1.57707 8.93544L1.91184 8.69632C2.28192 8.43198 2.48008 7.98816 2.42986 7.53616L2.31143 6.47035C2.04492 4.0717 4.0717 2.04492 6.47035 2.31143L7.53617 2.42986C7.98816 2.48008 8.43198 2.28192 8.69632 1.91184L8.93544 1.57707ZM16.6537 8.60164C17.144 9.09189 17.144 9.88676 16.6537 10.377L11.8597 15.171C11.2439 15.7869 10.2454 15.7869 9.62966 15.171L7.34629 12.8877C6.85605 12.3975 6.85605 11.6026 7.34629 11.1124C7.83654 10.6221 8.63138 10.6221 9.12163 11.1124L10.7447 12.7354L14.8784 8.60164C15.3686 8.1114 16.1635 8.1114 16.6537 8.60164Z",fill:"#0093FF"})})}),(0,i.jsx)("h2",{className:"lg:text-lg text-base font-semibold text-black ps-2",children:"".concat(null==e?void 0:e.validForDays," days Extension")})]}),(0,i.jsx)("p",{className:"text-sm font-medium text-black lg:ps-0 ps-8 pt-1.5 lg:pt-0",children:null==e?void 0:null===(l=e.priceDetails)||void 0===l?void 0:null===(t=l.listedPriceDetails)||void 0===t?void 0:t.listedCost})]}),(0,i.jsx)("div",{className:"border-t border-gray-200 pt-4",children:(0,i.jsx)("ul",{className:"space-y-3",children:null==e?void 0:null===(n=e.features)||void 0===n?void 0:n.map((e,t)=>(0,i.jsx)("li",{className:"flex items-start pl-3 gap-3 relative after:content-[''] after:absolute after:w-1.5 after:h-1.5 after:bg-black after:rounded-full after:top-0 after:bottom-0 after:my-auto after:left-0",children:(0,i.jsx)("span",{className:"lg:text-sm text-xs font-light text-black leading-relaxed",children:e})},t))})})]},null==e?void 0:e.id)})})}),(0,i.jsx)("div",{className:"flex justify-between items-center mt-3 w-full",children:(0,i.jsx)("button",{type:"button",disabled:null===m,onClick:()=>{h||y(x)},className:"".concat(null!==m?"bg-[#1562AF] hover:bg-[#1b4b7b]":"bg-[#a09f9f]"," text-white px-4 py-[11px] w-full ml-auto lg:text-base text-sm font-semibold transition-colors duration-200"),children:h?"Processing...":"Extend Validity"})})]})}A.propTypes={selectedAddOnList:d().any,courseId:d().any,addOnBatchId:d().any,setTopUp:d().any,courseAddOnName:d().string};let m=A}}]);
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.