PageSourceSearch

https://unstop.com/chunk-QTFVI5UA.js

js unstop.com collected 2026-10-02 02:41:41 UTC 18,084 bytes, 1 lines download raw bytes

1import{d as ae}from"./chunk-6KGZXWQC.js";import{a as re,b as se}from"./chunk-M6MKHCWP.js";import"./chunk-HZTZ7UDT.js";import{a as ne}from"./chunk-VDHMNIPW.js";import{e as ie}from"./chunk-6NHZTPCS.js";import"./chunk-GWP52JAF.js";import"./chunk-SBK5GHAF.js";import"./chunk-C22WGXC3.js";import"./chunk-PYESVWFJ.js";import"./chunk-ZCP5KTTM.js";import"./chunk-WAF2UKPS.js";import"./chunk-R3QRL77R.js";import"./chunk-G2NZI5V3.js";import{h as oe}from"./chunk-62DYWMYT.js";import"./chunk-TEBKKOGH.js";import"./chunk-UMK6AGIS.js";import"./chunk-4QX5TW7Y.js";import"./chunk-7UZYWCAJ.js";import"./chunk-RIQOBMUM.js";import{j as Y,l as Z,m as ee,o as te}from"./chunk-WX25E2HZ.js";import{a as J,b as X}from"./chunk-I5K7UUBW.js";import"./chunk-6BAE5M2B.js";import"./chunk-GPTXSPLI.js";import"./chunk-OLSNRRTA.js";import"./chunk-GJNXMHJK.js";import"./chunk-CLUIJ6WE.js";import{a as d}from"./chunk-XWMJJGBF.js";import"./chunk-5G7452JJ.js";import"./chunk-O6NNHBDA.js";import{h as I}from"./chunk-VK3ZU6WP.js";import{G as K,u as W}from"./chunk-BRHCVEVW.js";import{Ac as Q,Bc as T,Fa as A,Ic as D,Jc as L,Ka as p,Me as k,O as _,Oa as N,Ob as h,Oc as B,Pc as r,Qa as C,Qc as a,Ra as f,Rc as g,Wa as x,Xc as $,Zc as U,_a as b,cc as v,ed as E,ge as M,hc as j,hd as c,ld as S,mc as O,md as y,me as z,nc as R,nd as w,rd as G,s as V,td as H,wd as s,xa as de,y as m,zc as F}from"./chunk-7DV7UWC6.js";import"./chunk-XS7UEPGF.js";import{a as u,b as q,n as P}from"./chunk-IP4IO47A.js";k();k();de();k();var pe=(()=>{class n{constructor(){this._http=p(I),this._destroyRef=p(x),this._question=b(null),this.question=this._question,this._streakCreated=b(!1),this.streakCreated=this._streakCreated,this._userProgress=b(null),this.userProgress=this._userProgress}setQuestion(e){this._question.set(e)}setStreakCreated(e){this._streakCreated.set(e)}setUserProgress(e){this._userProgress.set(e)}postStreak(e){return this._http.post("/api/userstreak/createStreak",e).pipe(m(o=>o),_(o=>this.handleError(o,"Failed to create streak")))}createProgressForQuestion(e,t){let o=`/api/code/competition/getorcreate/user/progress/${e}/practice/0/${t}`;return this._http.get(o).pipe(m(i=>i),_(i=>this.handleError(i,"Failed to get progress")))}fetchPracticeQuestion(e){let t="/api/code/competition/get/practice/question/"+e;return this._http.get(t).pipe(m(o=>o),_(o=>this.handleError(o,"Failed to get Question")))}getQuestionsForChallengeModule(e,t){let o=`/api/code/competition/get/module/questions/${e}`,i=t?`${o}/${t}`:o;return this._http.get(i).pipe(_(ce=>this.handleError(ce,"Failed to get Question")))}getProgressForQuestion(e){return this._http.get(`/api/code/competition/update/user/question/progress/status/for/particular/competition/0/practice/${e}`).pipe(m(t=>t),_(t=>this.handleError(t,"Failed to get progress")))}handleError(e,t){console.error("API Error:",e);let o=e?.error?.message||t||"An error occurred";return V(()=>e)}getProblemList(e){let t=`/api/code/competition/practicequestions/editor?id=${e}`;return this._http.get(t).pipe(m(o=>o.status?o.data:[]),_(o=>this.handleError(o,"Custom error message")))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"any"})}}return n})();k();var ue=["requestFeatureModal"],ge=["reportBugModal"],_e=["loginModalComponent"],me=()=>[import("./chunk-WIBZAVD5.js").then(n=>n.UnCodeEditorComponent)],he=()=>[W];function Ce(n,l){if(n&1){let e=U();r(0,"un-code-editor",5),E("interaction",function(o){C(e);let i=c(2);return f(i.handleInteraction(o))})("accessDenied",function(o){C(e);let i=c(2);return f(i.handleAccessDenied(o))}),a()}if(n&2){let e=c(2);B("problemStatement",e.question())("editorConfig",e.editorConfig)}}function fe(n,l){if(n&1&&(R(0,Ce,1,2),F(1,0,me),T()),n&2){let e,t=c();h(),Q(((e=t.question())==null?null:e.id)&&t.editorConfig)}}function Me(n,l){n&1&&g(0,"app-loaders-with-text")}function Pe(n,l){}function xe(n,l){}function be(n,l){}function ve(n,l){n&1&&$(0)}function Oe(n,l){if(n&1&&O(0,ve,1,0,"ng-container",6),n&2){c(2);let e=G(11);B("ngTemplateOutlet",e)}}function Ee(n,l){if(n&1&&(R(0,Oe,1,1),F(1,0,he),T()),n&2){let e=c();h(),Q(e.proModal)}}function Se(n,l){if(n&1){let e=U();g(0,"div",7),r(1,"div",8)(2,"em",9),E("click",function(){C(e);let o=c();return f(o.proModal=!1)}),s(3," close "),a(),g(4,"img",10),r(5,"div",11),g(6,"img",12),r(7,"div",13),s(8," Be "),r(9,"strong"),s(10,"Great"),a(),s(11," . Be "),r(12,"strong"),s(13,"Pro"),a(),s(14," . "),r(15,"span"),s(16,"6 Services, 1 Platform"),a()()(),r(17,"div",14),g(18,"img",15),r(19,"div",13)(20,"strong"),g(21,"img",16),s(22," Solutions "),a(),r(23,"span"),s(24,"to practice sessions"),a()()(),r(25,"ul")(26,"li"),s(27,"10 AI Mock Tests per month"),a(),r(28,"li"),s(29,"10 AI Mock Interviews per month"),a(),r(30,"li"),s(31,"15% off on all mentorship sessions"),a(),r(32,"li"),s(33,"Exclusive access to masterclasses worth INR 2,400"),a(),r(34,"li"),s(35,"Interview prep tools for 100+ companies"),a(),r(36,"li"),s(37,"Rewards worth INR 7,200"),a()(),r(38,"div",17)(39,"span",18),s(40," Know More "),a(),r(41,"span",19),E("click",function(){C(e);let o=c();return f(o.subscriptionPayment())}),g(42,"img",20),s(43," Go Pro Now "),a()()()}if(n&2){let e=c();h(),H("responsiveSlide",e.viewport()=="mobile")}}var Ke=(()=>{class n{get streakCreated(){return this._practiceCodeEditorService.streakCreated()}constructor(){this._viewportService=p(ne),this.viewport=z(()=>this._viewportService.viewport()),this._router=p(Z),this._route=p(Y),this._destroyRef=p(x),this._http=p(I),this._envInjector=p(N),this._configService=p(ae),this._titleService=p(X),this._metaService=p(J),this._authService=p(ie),this._practiceCodeEditorService=p(pe),this._menubarService=p(oe),this.question=z(()=>this._practiceCodeEditorService.question()),this.editorConfig={codeEditor:"ace",languages:null,source:"blank",sourceId:null,showHeader:!0,enableShortcuts:!0,enableFullscreen:!0,showSolution:!0,showSubmission:!0,showNotes:!0},this.requestFeatureModalLoaded=!1,this.reportBugModalLoaded=!1,this.loginModalComponentInstance=null,this._route.paramMap.pipe(d(this._destroyRef)).subscribe(e=>{let t=e.get("type"),o=e.get("questionId");o&&(this.fetchQuestion(t),this.getQuestionProgress(o))})}ngAfterViewInit(){this._authService.isLoggedIn()||this.openLoginModal()}ngOnInit(){this._menubarService.menuBarStatus=!1}
1setMetadata(){let e=this.question()?.name+" | Practice | Unstop",t=document.createElement("div");t.innerHTML=this.question().problem_statement;let o=t.innerText.substring(0,100);this._titleService.setTitle(e),this._metaService.addTags([{name:"description",content:o},{name:"og:title",content:e},{name:"og:description",content:o}])}handleInteraction(e){switch(e){case"requestFeature":this.openFeatureRequestModal();break;case"bugReport":this.openReportBugModal();break;case"compile":this.createStreak(),this.updateUserProgress(this.question()?.id);break;case"submission":this.createStreak(),this.updateUserProgress(this.question()?.id);break;case"solution":this.updateUserProgress(this.question()?.id,1)}}createStreak(){if(this._authService.isLoggedIn()){let e={entity_type:"practice",entity_id:this.question()?.id==null?0:this.question()?.id};this.streakCreated||this._practiceCodeEditorService.postStreak(e).pipe(d(this._destroyRef)).subscribe({next:t=>{this._practiceCodeEditorService.setStreakCreated(!0)},error:t=>{this._practiceCodeEditorService.setStreakCreated(!1)}})}}openFeatureRequestModal(){return P(this,null,function*(){try{let e=yield import("./chunk-CVPFMJTX.js"),t=this.requestFeatureModal.createComponent(e.RequestFeatureModalComponent,{environmentInjector:this._envInjector});t.setInput("theme",this._configService.mode()),t.instance.formVisibility.pipe(d(this._destroyRef)).subscribe(()=>this.requestFeatureModal.clear()),this.requestFeatureModalLoaded=!0}catch(e){console.error("Error loading RequestFeatureModalComponent:",e)}})}openReportBugModal(){return P(this,null,function*(){try{let e=yield import("./chunk-XEB2J4FY.js"),t=this.reportBugModal.createComponent(e.ReportABugComponent,{environmentInjector:this._envInjector});t.setInput("theme",this._configService.mode()),t.setInput("formType","practice"),t.setInput("iconDisplayType","genericEditor"),t.setInput("bugParentComponent","app-generic-editor"),t.instance.enableForMobile=!0,t.instance.exitPanel.pipe(d(this._destroyRef)).subscribe(()=>{t.destroy()}),this.reportBugModalLoaded=!0,t.instance.showFreshBugForm()}catch(e){console.error("Error loading ReportABugModule:",e)}})}handleAccessDenied(e){switch(e){case"auth":this.openLoginModal();break;case"pro":this.openProModal();break}}openProModal(){this.proModal=!0}openLoginModal(){return P(this,null,function*(){try{let e=yield import("./chunk-EDP4W3LE.js"),t=this.loginModalComponent.createComponent(e.LoginModalComponent);t.setInput("continueAsGuest",!1),t.setInput("competitionLoginModal",!0),t.setInput("lazyLoading",!1),t.setInput("isLoggedIn",!1),t.instance.exitLogin.pipe(d(this._destroyRef)).subscribe(o=>this.loginModalComponent.clear()),this.loginModalComponentInstance=t.instance}catch(e){console.error("Error loading login modal:",e)}})}subscriptionPayment(){if(!this._authService.userLoggedIn){this._router.navigateByUrl("/auth/login?returnUrl=/pro");return}this._router.navigateByUrl("/pro")}fetchQuestion(e){switch(e){case"practice":this.fetchPracticeQuestion(e);break;case"challenge-assessment":this.getQuestionForChllangeAssesment(e);break}}fetchPracticeQuestion(e){let t=Number(this._route.snapshot.paramMap.get("questionId"));this._practiceCodeEditorService.setQuestion(null),this._practiceCodeEditorService.fetchPracticeQuestion(t).pipe(d(this._destroyRef)).subscribe({next:o=>{this._practiceCodeEditorService.setQuestion(u(u({},this._practiceCodeEditorService.question()),o.data)),this.editorConfig=q(u({},this.editorConfig),{source:e,sourceId:o.data.id,languages:o.data.languages})}})}getQuestionForChllangeAssesment(e){let t=Number(this._route.snapshot.paramMap.get("questionId")),o=Number(this._route.snapshot.queryParamMap.get("moduleId"));this._practiceCodeEditorService.setQuestion(null),this._practiceCodeEditorService.getQuestionsForChallengeModule(o,t).pipe(d(this._destroyRef)).subscribe({next:i=>{this._practiceCodeEditorService.setQuestion(u(u({},this._practiceCodeEditorService.question()),i.data[0])),this.editorConfig=q(u({},this.editorConfig),{source:e,sourceId:i.data[0].id,languages:i.data[0].languages})}})}getQuestionProgress(e){this._practiceCodeEditorService.getProgressForQuestion(e).pipe(d(this._destroyRef)).subscribe({next:t=>{this._practiceCodeEditorService.setUserProgress(t?.data),this._practiceCodeEditorService.setQuestion(u({user_progress:t?.data},this._practiceCodeEditorService.question()))}})}updateUserProgress(e,t=null){this._practiceCodeEditorService.userProgress()!=null&&t==null||this._practiceCodeEditorService.createProgressForQuestion(e,t).pipe(d(this._destroyRef)).subscribe({next:o=>{this._practiceCodeEditorService.setUserProgress(o?.data),this._practiceCodeEditorService.setQuestion(u({user_progress:o?.data},this._practiceCodeEditorService.question()))}})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=j({type:n,selectors:[["app-practice-code-editor"]],viewQuery:function(t,o){if(t&1&&(S(ue,5,v),S(ge,5,v),S(_e,5,v)),t&2){let i;y(i=w())&&(o.requestFeatureModal=i.first),y(i=w())&&(o.reportBugModal=i.first),y(i=w())&&(o.loginModalComponent=i.first)}},decls:12,vars:2,consts:[["requestFeatureModal",""],["reportBugModal",""],["loginModalComponent",""],["gopro",""],[2,"height","100vh"],[3,"interaction","accessDenied","problemStatement","editorConfig"],[4,"ngTemplateOutlet"],[1,"modal_right_bg"],[1,"pro_popup"],[1,"material-icons","close","gtm_close_solution_page",3,"click"],["src","https://d8it4huxumps7.cloudfront.net/uploads/images/unstop-pro/email/unsop-pro.png","alt","Unstop Pro Logo","width","","height","",1,"logo"],[1,"be_great"],["src","https://d8it4huxumps7.cloudfront.net/uploads/images/unstop-pro/be-great.png?d=140x140","alt","Be Great","width","70","height","70"],[1,"cptn"],[1,"solutions"],["src","https://d8it4huxumps7.cloudfront.net/uploads/images/unstop-pro/solutions-image.png","alt","Solutions Card"],["src","https://d8it4huxumps7.cloudfront.net/uploads/images/unstop-pro/solutions-icon.svg","alt","Solutions Icon"],[1,"btm_btn"],["routerLink","/pro",1,"gtm_gopro_page"],[1,"waves-effect","gtm_buypro_solution_page",3,"click"],["src","https://d8it4huxumps7.cloudfront.net/uploads/images/unstop-pro/go-pro-now.png","alt","Go Pro Now","width","18","height","18"]],template:function(t,o){if(t&1&&(r(0,"div",4),D(1,fe,3,1)(2,Me,1,0,"app-loaders-with-text"),a(),O(3,Pe,0,0,"ng-template",null,0,M)(5,xe,0,0,"ng-template",null,1,M)(7,be,0,0,"ng-template",null,2,M),D(9,Ee,3,1),O(10,Se,44,2,"ng-template",null,3,M)),t&2){let i;h(),L((i=o.question())!=null&&i.id&&o.editorConfig?1:2),h(8),L(o.proModal?9:-1)}},dependencies:[K,te,ee,se,re],styles:['[_nghost-%COMP%]{display:block}[_nghost-%COMP%]     app-report-a-bug un-icon{display:none}.pro_popup[_ngcontent-%COMP%]{position:fixed;margin:auto;max-height:80vh;z-index:999;border-radius:20px;border:.5px solid #9e9bab;background:#130e39;overflow-y:auto}@media only screen and (min-width: 768px){.pro_popup[_ngcontent-%COMP%]{padding:30px 40px;left:50%;
1top:50%;width:550px;transform:translate(-50%,-50%)}}.pro_popup[_ngcontent-%COMP%]:after{content:"";background-image:url(https://d8it4huxumps7.cloudfront.net/uploads/images/unstop-pro/popup-vector.png?d=1034x910);position:absolute;top:0;right:0;background-size:100%;background-repeat:no-repeat;width:394px;height:100%;z-index:-1}.pro_popup[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]{position:absolute;right:20px;top:20px;width:30px;height:30px;padding:3px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:#130e39;color:var(--grey-00);font-size:18px;cursor:pointer;transition:.3s}.pro_popup[_ngcontent-%COMP%]   .close[_ngcontent-%COMP%]:hover{background:var(--purple-700)}.pro_popup[_ngcontent-%COMP%]   .logo[_ngcontent-%COMP%]{width:93px;display:block}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:20px}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:70px;display:block}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]{width:calc(100% - 70px);padding-left:10px;color:var(--grey-00);font-size:40px;line-height:120%}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:600}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:block;font-size:16px;line-height:120%}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]{display:flex;align-items:center;background:var(--grey-00);border-radius:12px;overflow:hidden;margin-top:30px}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:186px;display:block}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]{width:calc(100% - 186px);padding-left:10px;color:var(--grey-1100);font-size:20px}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{font-weight:700;display:flex;align-items:center}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:19px;margin-right:10px}.pro_popup[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{margin:15px 0 0}.pro_popup[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{color:var(--grey-00);font-size:14px;line-height:120%;position:relative;padding-left:24px}.pro_popup[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before{content:"check";font-family:Material Icons;font-feature-settings:"liga";font-size:14px;width:14px;height:14px;position:absolute;left:0;top:0;bottom:0;margin:auto}.pro_popup[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:not(:last-child){margin-bottom:15px}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]{margin-top:30px;display:flex;justify-content:space-between}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{height:50px;padding:0 30px;display:inline-flex;justify-content:center;align-items:center;border-radius:50px;color:#fefefe;font-size:16px;cursor:pointer;transition:.3s}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child{background:#17124580}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:first-child:hover{background:var(--grey-00);color:#130e39}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{background:var(--purple-700);min-width:210px}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child   img[_ngcontent-%COMP%]{margin-right:12px;width:18px}@media (max-width: 767px){.pro_popup[_ngcontent-%COMP%]{left:0;bottom:0;width:100%;padding:20px;border-radius:20px 20px 0 0}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:50px;height:auto}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]{width:calc(100% - 50px);font-size:24px}.pro_popup[_ngcontent-%COMP%]   .be_great[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:14px}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:160px}.pro_popup[_ngcontent-%COMP%]   .solutions[_ngcontent-%COMP%]   .cptn[_ngcontent-%COMP%]{width:calc(100% - 160px);padding-left:0;font-size:16px}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{font-size:14px}.pro_popup[_ngcontent-%COMP%]   .btm_btn[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:last-child{min-width:auto}}']})}}return n})();export{Ke as PracticeCodeEditorComponent};

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.