PageSourceSearch

https://ieltsidpindia.com/chunk-TIXEYESN.js

js ieltsidpindia.com collected 2026-10-02 17:04:10 UTC 6,452 bytes, 1 lines download raw bytes

1import{n as y}from"./chunk-2ZXDKB47.js";import{J as N}from"./chunk-MTJSZ6IN.js";import{H as E,V as l,aa as A,ea as I,g as T,m as d,o as S}from"./chunk-P67MUED3.js";import{a as g}from"./chunk-AQHZ5JOB.js";var o=(function(s){return s.MULTIPLE_CHOICE="Multiple choice",s.MATCHING_HEADER="Matching header",s.MATCHING_WORDS="Matching words",s.MATCHING_FEATURES="Matching features",s.SINGLE_QUESTION="Single question",s.MULTIPLE_QUESTIONS="Multiple questions",s})(o||{}),a=(function(s){return s.SINGLE_SELECT="Single select",s.MULTIPLE_SELECT="Multiple select",s.DRAG_AND_DROP="Drag and drop",s.SELECTION="Selection",s.FREE_TYPING="Free typing",s.MULTIPLE_SELECT_TWO_ANSWERS="Multiple select (2 answers)",s.FREE_TYPING_THREE_WORDS="Free typing (3 words)",s})(a||{}),u=(function(s){return s.READING="reading",s.LISTENING="listening",s.SPEAKING="speaking",s.WRITING="writing",s})(u||{}),h="ESA",f={education:{code:"ACD",label:"Academic"},work:{code:"GEN_TRN",label:"General Training"}};function D(s){return Object.values(f).find(i=>i.code===s)}var w=class{constructor(i,t,e,r){this.pageTitle=i,this.quizDescription=t,this.quiz=e,this.goalSelectionData=r}},M=class{constructor(i,t){this.shortQuestion=i,this.longQuestion=t}},m=class{constructor(i,t,e,r){this.answerSequence=i,this.shortAnswer=t,this.longAnswer=e,this.isRightAnswer=r}},_=class{constructor(i,t){this.question=i,this.answer=t}},R=class{constructor(i,t,e,r,n){this.quizParagraph=i,this.quizDescription=t,this.quizType=e,this.answerType=r,this.skillType=n}},P=class{constructor(i,t,e,r){this.levelDetailsTitle=i,this.levelDetails=t,this.whatsNextTitle=e,this.whatsNext=r}},x=class{constructor(i,t,e){this.title=i,this.shortDescription=t,this.imageDetails=e}},L=class{constructor(i,t,e,r,n,c){this.title=i,this.shortDescription=t,this.imageDetails=e,this.longDescription=r,this.popupCardTitle=n,this.cardDetails=c}},C=class{constructor(i,t,e,r,n,c,p,b,W,F,G,O){this.contentType=i,this.title=t,this.shortDescription=e,this.imageDetails=r,this.metaTags=n,this.modifiedData=c,this.duration=p,this.url=b,this.videoDetails=W,this.youtubeVideo=F,this.assetId=G,this.gaId=O}};var j=(()=>{class s{static{this.NUMBERED_BLANK_PATTERN=/\d+\s*QQQ/g}static{this.BLANK_PATTERN=/QQQ/g}constructor(t,e){this.userAuthService=t,this.httpService=e,this.quizType=o,this.answerType=a,this.skillType=u,this.quizClose=new T(!1),this.showEsaLogin=new T(!1),this.showEsaResults=new T(!1)}storingEsaResults(t){return this.getUserProfileId().pipe(l(e=>{let r=`/${e}`,n=g({userprofileId:e},this.buildAssessmentPayload(t));return this.httpService.postWithPath("userPreference",r,n)}),E(e=>this.handleEsaError("storing",e)))}updateEsaResults(t){return this.getUserProfileId().pipe(l(e=>{let r=this.buildAssessmentType(t.testType),n=`/${e}?assessmentType=${r}`,c=g({userprofileId:e},this.buildAssessmentPayload(t));return this.httpService.putWithPath("userPreference",n,c)}),E(e=>this.handleEsaError("updating",e)))}getEsaResults(){return this.getUserProfileId().pipe(l(t=>{let e=`/${t}?assessmentType=${h}`;return this.httpService.get("userPreference",e)}),E(t=>this.handleEsaError("fetching",t)))}getUserProfileId(){return d(this.userAuthService.getUserInfo()).pipe(l(t=>t?.sub?d([t.sub]):S(()=>new Error("User profile ID not found"))))}handleEsaError(t,e){return console.error(`Failed to ${t} ESA result:`,e),S(()=>e)}buildAssessmentType(t){let e=Object.values(f).find(r=>r.label===t);return e?`${h}_${e.code}`:h}extractTestTypeCode(t){return t?.startsWith(`${h}_`)?t.substring(h.length+1):""}getCmsTagFromAssessmentType(t){let e=this.extractTestTypeCode(t);return e&&D(e)?.label?.toLowerCase().replace(/\s+/g,"")||""}buildAssessmentPayload(t){try{let e=new Date().toISOString();return{assessmentType:this.buildAssessmentType(t.testType),assessmentScore:{listening:{totalQuestions:t?.totalListeningQuestions||0,correctAnswers:t?.correctListeningAnswers||0,timestamp:e},reading:{totalQuestions:t?.totalReadingQuestions||0,correctAnswers:t?.correctReadingAnswers||0,timestamp:e},writing:{totalQuestions:0,correctAnswers:0,timestamp:e},speaking:{totalQuestions:0,correctAnswers:0,timestamp:e}}}}catch(e){throw console.error("Error building assessment payload:",e),new Error("Failed to build assessment payload")}}calculateTotalQuestions(t){return t?t.reduce((e,r)=>e+this.getQuestionCount(r),0):0}getQuestionCount(t){return t?t.quizDescription?.length>1?t.quizDescription.length:this.isFreeTypingAndReading(t)||this.isMultipleQuestionsWithFreeTypingWithThreeWords(t)?Math.max(t.quizDescription?.[0]?.answer?.length||0,1):this.isMatchingWordsOrFeatures(t)?this.countBlanksInText(t):this.isSelectionWithImageMedia(t)?this.get
1SelectionQuestionCount(t):this.isMultipleQuestionsWithFreeTyping(t)?Math.max(t.quizDescription?.length||0,1):this.isMultipleSelectWithTwoAnswers(t)?2:1:0}getSelectionQuestionCount(t){let e=t.quizDescription?.[0]?.answer;if(!Array.isArray(e))return 0;let n=e.filter(c=>c?.answerSequence).length||e.length;return Math.max(n,1)}countBlanksInText(t){if(!t)return 1;let e=t.quizParagraph?.longQuestion||t.quizDescription?.[0]?.question?.longQuestion||"",{total:r}=this.getBlankCounts(e);return Math.max(r,1)}getBlankCounts(t){if(!t)return{numberedCount:0,plainCount:0,total:0};let e=t.match(s.NUMBERED_BLANK_PATTERN)||[],r=t.match(s.BLANK_PATTERN)||[],n=e.length,p=r.length-n;return{numberedCount:n,plainCount:p,total:n+p}}isMultipleQuestionsWithFreeTyping(t){return t?.quizType===o.MULTIPLE_QUESTIONS&&t?.answerType===a.FREE_TYPING&&t?.skillType===u.LISTENING}isMultipleSelectWithTwoAnswers(t){return t?.quizType===o.MULTIPLE_CHOICE&&t?.answerType===a.MULTIPLE_SELECT_TWO_ANSWERS}isMultipleQuestionsWithFreeTypingWithThreeWords(t){return t?.quizType===o.MULTIPLE_QUESTIONS&&t?.answerType===a.FREE_TYPING_THREE_WORDS}isSelectionWithImageMedia(t){return t?.quizType===o.MATCHING_FEATURES&&t?.answerType===a.SELECTION&&t?.quizParagraph?.imageMedia}isFreeTypingAndReading(t){return t?.answerType===a.FREE_TYPING&&t?.skillType===u.READING}isMatchingWordsOrFeatures(t){return t?.quizType===o.MATCHING_WORDS||t?.quizType===o.MATCHING_FEATURES&&(!t?.quizParagraph?.imageMedia||t?.answerType!==a.SELECTION)}getParagraphContent(t){return t?.includes("```")?t.replace(/```/g,""):t||""}static{this.\u0275fac=function(e){return new(e||s)(I(y),I(N))}}static{this.\u0275prov=A({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{f as a,w as b,M as c,m as d,_ as e,R as f,P as g,x as h,L as i,C as j,j as k};

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.