PageSourceSearch

https://my.otus.com/9406.0197557d1c4573c1.js

js otus.com collected 2026-09-24 09:31:07 UTC 167,987 bytes, 25 lines download raw bytes

1"use strict";(self.webpackChunkotus_app=self.webpackChunkotus_app||[]).push([[9406],{87942:(V,k,r)=>{r.d(k,{z:()=>Fe});var l=r(29923),N=r(41854),v=r(89466),H=r(39841),Z=r(54482),x=r(75797),$=r(83268),m=r(89635),w=r(63269);function L(...J){const ce=(0,w.jO)(J);return ce?(0,m.z)(L(...J),(0,$.Z)(ce)):(0,Z.e)((_,A)=>{(0,H.l)([_,...(0,x.k)(J)])(A)})}function C(...J){return L(...J)}var T=r(61135),u=r(63900),O=r(71884),R=r(39300),G=r(54004),te=r(34782),Ee=r(4128),ae=r(39646),Me=r(70262),Re=r(18505),ie=r(10425),j=r(32850),Ne=r(24435),Ie=r(61237),Pe=r(73563),le=r(84347),De=r(5777),Ue=r(30378),_e=r(94650),$e=r(75462);let Fe=(()=>{class J{constructor(_,A,f){this.napiService=_,this.ocaService=A,this.loadingIndicatorService=f,this.companies=[],this.attempts=[],this.selectedAttemptIndex=0,this.selectedCompany=new T.X(null),this.selectedCompany$=this.selectedCompany.asObservable(),this.assessmentParams=new T.X(null),this.assessments$=this.assessmentParams.asObservable().pipe((0,u.w)(d=>this.getAssessments(d.companyId,d.is3rdPartyView,d.districtId))),this.selectedAssessmentId=new T.X(null),this.groups$=this.selectedAssessmentId.asObservable().pipe((0,u.w)(d=>this.getGroups(d))),this.selectedGroupId=new T.X(null),this.filters=new T.X(null),this.selectedAttempt=new T.X(null),this.breakdownParams=new T.X(null),this.breakdowns$=this.breakdownParams.asObservable().pipe((0,O.x)(N.Z),(0,R.h)(d=>d?.assessmentId),(0,u.w)(d=>this.ocaService.getGroupBreakdown(d.assessmentId,d.groupId,d.filters)),C(this.selectedAttempt),(0,G.U)(([d,E])=>{var p,P,M;return this.attempts=null===(p=d.groupBreakDownsCounts)||void 0===p?void 0:p.map(b=>b.attemptName),E?(this.selectedAttemptIndex=null===(P=this.attempts)||void 0===P?void 0:P.indexOf(E),{groupBreakdowns:d.groupBreakdowns,groupBreakDownsCounts:null===(M=d.groupBreakDownsCounts)||void 0===M?void 0:M.filter(b=>b.attemptName===E)}):d}),(0,te.d)(1)),this.groupBreakdown$=this.breakdowns$.pipe((0,G.U)(d=>{const E=[];return d.groupBreakDownsCounts&&0!==d.groupBreakDownsCounts.length?(d.groupBreakdowns.forEach(p=>{const P=d.groupBreakDownsCounts.reduce((M,b)=>{M.name=p.target_name,M.type="bar",M.data||(M.data=[]);const D=b.groupTargetData.find(Y=>Y.groupTargetName===p.target_name),F={name:b.attemptName,y:D.groupTargetCount,custom:{students:D.studentArray,target:p.target_name,target_raw:p.target_name.replace(/\s*\([^()]*\)$/g,"")}};return M.data.push(F),M},{});E.push(P)}),E.reverse()):[]})),this.studentBreakdown$=this.breakdowns$.pipe((0,G.U)(d=>{const E=[];return d.groupBreakDownsCounts&&0!==d.groupBreakDownsCounts.length?(["Below Target","At or Above Target"].forEach((P,M)=>{const b=d.groupBreakDownsCounts.reduce((D,F)=>{var Y;if(null===(Y=F.studentTargetData)||void 0===Y||!Y.hasTargetData)return D;let re;return D.name=P,D.type="bar",D.data||(D.data=[]),re=0===M?{name:F.attemptName,y:F.studentTargetData.belowTargetCnt,custom:{students:F.studentTargetData.belowStudentsArray,target:P}}:{name:F.attemptName,y:F.studentTargetData.atOrAboveTargetCnt,custom:{students:F.studentTargetData.atOrAboveStudentsArray,target:P}},D.data.push(re),D},{});b.data&&E.push(b)}),E.reverse()):[]})),this.percentageBreakdown$=this.breakdowns$.pipe((0,G.U)(d=>{const E=[];if(!d.groupBreakDownsCounts||0===d.groupBreakDownsCounts.length)return[];for(let P=0;P<100;P+=20){const M=d.groupBreakDownsCounts.reduce((b,D)=>{const F=`${P}${P>0?"th":""}-${P+20}th`;b.name=F,b.type="bar",b.data||(b.data=[]);const Y=D.percentageData.find(de=>de.start===P);return b.data.push({name:D.attemptName,y:Y.studentCount,custom:{students:Y.studentsArray,target:F,target_raw:F}}),b},{});M.data.length>0&&E.push(M)}return E.reverse()})),this.students$=(0,H.a)([this.selectedAssessmentId,this.filters,this.selectedAttempt,this.selectedGroupId]).pipe((0,O.x)(N.Z),(0,u.w)(([d,E,p,P])=>{if(d&&P){const M=this.getAllDataAndAverages(d,E).pipe((0,G.U)(F=>({result:F,selectedAttempt:p}))),b=this.getGroupTargets(P),D=this.getAssessmentById(d);return(0,Ee.D)({average:M,groups:b,assessment:D})}return(0,ae.of)({average:null,groups:null,assessment:null})}),(0,G.U)(({average:d,groups:E,assessment:p})=>{var P,M;return this.setSelectedAssessment(p),null===(M=null===(P=d?.result)||void 0===P?void 0:P.success)||void 0===M?void 0:M.filter(b=>b.attempt_name===d.selectedAttempt).map(b=>{const D=this.getGroupTargetBreakdown(E,b.student_score,p),F=this.getStudentTargetBreakdown(b.student_score,b.student_target),Y=this.getPercentileBreakdown(b.student_percentage);return(0,l.Deserialize)({sis_id:b.sis_id,first_name:b.first_name,last_name:b.last_name,email:b.email,assessment_date:b.assessment_date,student_score:b.student_score,group_breakdown:D?.n
1ame,group_breakdown_id:D?.id,group_breakdown_color:D?.color,group_breakdown_light_color:D?.lightColor,student_target:b.student_target,student_target_breakdown:F.name,student_target_breakdown_color:F.color,student_target_breakdown_light_color:F.lightColor,student_id:b.student_id,student_percentage:b?.student_percentage,percentile_breakdown:Y?.name,percentile_breakdown_color:Y?.color,percentile_breakdown_light_color:Y?.lightColor},Ie.a)})}),(0,G.U)(d=>d&&0!==d.length?d:[]),(0,Me.K)(()=>(0,ae.of)([])),(0,te.d)(1)),this.studentBreakdowns=new T.X([]),this.studentBreakdowns$=this.studentBreakdowns.asObservable(),this.studentName$=this.studentBreakdowns.asObservable().pipe((0,G.U)(d=>d.length>0?`${d[0].firstName} ${d[0].lastName}`:null)),this.selectedAssessment=new T.X(null),this.selectedAssessment$=this.selectedAssessment.asObservable()}setSelectedCompany(_){this.selectedCompany.next(_)}getSelectedCompany(){return this.selectedCompany.getValue()}getOtherCompanies(_){return this.companies.length>0?(0,ae.of)(this.companies):this.napiService.doGet("/analytics/3rdparty",{districtId:_},!1).pipe((0,G.U)(A=>A.success.hasOtherCompaniesData?(0,l.Deserialize)(A.success.otherCompaniesLogo,Ue.S):[]),(0,Re.b)(A=>{this.companies=A}))}getCompanyById(_){return this.getOtherCompanies().pipe((0,G.U)(A=>A.find(d=>d.id===_)))}setAssessmentParams(_){this.assessmentParams.next(_)}getAssessments(_,A,f){const d={};return d.is3rdPartyView=A,f&&(d.districtId=f),this.napiService.doGet(`/analytics/assessments/other-companies/${_}`,d,!1).pipe((0,G.U)(E=>{let p=[];return E.success&&(p=(0,l.Deserialize)(E.results,Ne.j)),p}))}setSelectedAssessmentId(_){this.selectedAssessmentId.next(_)}getGroups(_){return _?this.napiService.doGet(`/analytics/groups/assessment/${_}`,{},!1).pipe((0,G.U)(A=>{let f=[];return A.rows&&(f=(0,l.Deserialize)(A.rows,Pe.K)),f})):(0,ae.of)([])}getGroupTargets(_){return this.napiService.doGet(`/analytics/grouptargets/group/${_}`).pipe((0,G.U)(A=>{let f=[];return A.rows&&(f=(0,l.Deserialize)(A.rows,le.H)),f}))}sortGroups(_){return(0,v.Z)(_,f=>f.name)}getAllDataAndAverages(_,A){return this.napiService.doPost(`/analytics/attempts/assessment/${_}`,null,A).pipe((0,G.U)(f=>(this.loadingIndicatorService.dismiss(),f?.success?f:"")))}setSelectedGroupId(_){this.selectedGroupId.next(_)}setFilters(_){this.filters.next(_)}setBreakdownParams(_,A,f){this.breakdownParams.next({assessmentId:_,groupId:A,filters:f})}setSelectedAttempt(_){var A;this.selectedAttempt.next(_),this.selectedAttemptIndex=null===(A=this.attempts)||void 0===A?void 0:A.indexOf(_)}setStudentBreakdowns(_){this.studentBreakdowns.next(_)}getStudentBreakdowns(){return this.studentBreakdowns.getValue()}getAssessmentById(_){return this.napiService.doGet(`/analytics/assessments/${_}`,null,!1).pipe((0,G.U)(A=>A.success&&A.results.length>0?(0,l.Deserialize)(A.results[0],Ne.j):null))}setSelectedAssessment(_){this.selectedAssessment.next(_)}getSelectedAssessment(){return this.selectedAssessment.getValue()}getGroupTargetBreakdown(_,A,f){if(!_||null==A)return new le.H;_=this.formatTargets(_,f);const E=this.getColors()[_.length>10?10:_.length];let p;for(const[P,M]of _.entries())if(A>=M.value){p=M,p.color=E[P%10].hexString,p.lightColor=j.m.calculateBrighterColor(p.color);break}return p}getStudentTargetBreakdown(_,A){const d=this.getColors()[2];let E;return _>=A?(E=new le.H,E.name="At or Above Target",E.color=d[0].hexString,E.lightColor=j.m.calculateBrighterColor(E.color)):(E=new le.H,E.name="Below Target",E.color=d[1].hexString,E.lightColor=j.m.calculateBrighterColor(E.color)),E}getPercentileBreakdownByRange(_,A,f){const E=this.getColors()[5].reverse(),p=new le.H;return p.name=`${_}${_>0?"th":""}-${A}th`,p.color=E[f].hexString,p.lightColor=j.m.calculateBrighterColor(p.color),p}getPercentileBreakdown(_){const f=Array.from(Array(5)).map((E,p)=>({start:20*p,end:20*p+20,index:p}));let d;if(_>0)for(const E of f){const{start:p,end:P,index:M}=E;_>p&&_<=P&&(d=this.getPercentileBreakdownByRange(p,P,M))}else{const{start:E,end:p,index:P}=f[0];d=this.getPercentileBreakdownByRange(E,p,P)}return d}getColors(){const _=j.m.getStandardRangeColors();return[[],[_[9]],[_[9],_[0]],[_[9],_[1],_[0]],[_[9],_[8],_[1],_[0]],[_[9],_[8],_[7],_[1],_[0]],[_[9],_[8],_[7],_[6],_[1],_[0]],[_[9],_[8],_[7],_[6],_[5],_[1],_[0]],[_[9],_[8],_[7],_[6],_[5],_[4],_[1],_[0]],[_[9],_[8],_[7],_[6],_[5],_[4],_[3],_[1],_[0]],[_[9],_[8],_[7],_[6],_[5],_[4],_[3],_[2],_[1],_[0]]]}formatTargets(_,A){const f=[];if(!_||_.length<=0)return[];if(!A)return _;_.sort((p,P)=>P.value-p.value);const d=(_=_.map(p=>(p.name=p.name.trim(),p)))[0];return f.push({id:d.id,groupId:d.groupId,name:`At ${d.value===A.maximumScore?"":"or Above "}${d.name}`,value:d.value,userId:d.userId}),_.forEach((p,P)=>{const M=P===_.length-1;
10!==P&&f.push(p),M&&A.minimumScore!==p.value&&f.push({id:null,groupId:null,name:`Below ${p.name}`,value:A.minimumScore,userId:null})}),f}}return J.\u0275fac=function(_){return new(_||J)(_e.LFG(ie.b),_e.LFG(De.c),_e.LFG($e.v))},J.\u0275prov=_e.Yz7({token:J,factory:J.\u0275fac,providedIn:"root"}),J})()},77754:(V,k,r)=>{r.d(k,{D:()=>T});var l=r(36895),N=r(24006),v=r(57455),H=r(48742),Z=r(62039),x=r(79997),$=r(3665),m=r(25546),w=r(31988),L=r(45363),C=r(94650);let T=(()=>{class u{}return u.\u0275fac=function(R){return new(R||u)},u.\u0275mod=C.oAB({type:u}),u.\u0275inj=C.cJS({imports:[l.ez,N.u5,v.h,H.n,w.o,Z.QX,L._,$.z,x.U$,m.x]}),u})()},39406:(V,k,r)=>{r.r(k),r.d(k,{AnalyticsToolboxModule:()=>In,AnalyticsToolboxRoutes:()=>st,AnalyticsToolboxRoutingModule:()=>at});var l=r(36895),N=r(24006),v=r(9116),H=r(57455),Z=r(48742),x=r(36253),$=r(62039),m=r(60539),w=r(88781),L=r(66170),C=r(6554),T=r(81120),u=r(39830),O=r(79997),R=r(6734),G=r(11761),te=r(69502),Ee=r(67348),ae=r(32266),Me=r(50984),Re=r(3665),ie=r(88231),j=r(25746),Ne=r(18801),Ie=r(81586),Pe=r(37481),le=r(56478),De=r(88704),Ue=r(25546),_e=r(1817),$e=r(31988),Fe=r(6140),J=r(65501),ce=r(45363),_=r(6007),A=r(77754),f=r(37464),d=r(29923),E=r(47910),p=r(45840),P=r(57513),M=r(26624),b=r(70517),D=r(53024),F=r(79936),Y=r(49184),re=r(56711),de=r(8920),it=r(62537),lt=r(87942),e=r(94650),rt=r(93618),Be=r(12817),Ze=r(5777);let ge=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275dir=e.lG2({type:s}),s})();var oe=r(19882),he=r(79373),Ce=r(85368),be=r(39115),ye=r(70008),ve=r(74181),Ye=r(66969),ee=r(27733),me=r(10312),Xe=r(24254);const _t=["fileInput"];function ct(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6),e.SDv(2,7),e.qZA(),e.TgZ(3,"div",8),e._UZ(4,"img",9),e.qZA(),e.TgZ(5,"div",10),e.SDv(6,11),e.qZA(),e.TgZ(7,"div",12),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.openUrl("http://www.aimsweb.com/"))}),e._uU(8," http://www.aimsweb.com/ "),e.qZA()()}}function dt(s,i){if(1&s&&(e.TgZ(0,"div",13)(1,"div",14),e.SDv(2,15),e.qZA(),e.TgZ(3,"div",16)(4,"a",17)(5,"ot-icon-label",18),e.SDv(6,19),e.qZA()()(),e.TgZ(7,"div",20),e.SDv(8,21),e.qZA()()),2&s){const t=e.oxw();e.xp6(3),e.Udp("width",320,"px"),e.xp6(1),e.s9C("href",t._apiService.getApiUrl()+"/aimsweb/get_csv_template",e.LSH)}}const mt=function(){return{upload:"upload",excel:"file-excel"}};function pt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",36),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(3);return e.KtG(n.onUpload())}),e.TgZ(1,"ot-icon-label",37),e.SDv(2,38),e.qZA()()}if(2&s){const t=e.oxw().ngIf;e.xp6(1),e.Q6J("icon",e.DdM(1,mt)[t])}}function ut(s,i){1&s&&e._UZ(0,"ot-spinner",39)}function Tt(s,i){if(1&s&&(e.ynx(0),e.YNc(1,pt,3,2,"button",34),e.YNc(2,ut,1,0,"ot-spinner",35),e.BQk()),2&s){const t=i.ngIf;e.xp6(1),e.Q6J("ngIf","spin"!==t),e.xp6(1),e.Q6J("ngIf","spin"===t)}}function St(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.ALo(3,"otDateTimeFormat"),e.qZA(),e.TgZ(4,"td")(5,"div",40),e._uU(6),e.qZA()(),e.TgZ(7,"td")(8,"button",41),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw(2);return e.KtG(c.deleteFile(a.id))}),e._UZ(9,"ot-icon",42),e.qZA()()()}if(2&s){const t=i.$implicit;e.oxw();const o=e.MAs(16);e.xp6(2),e.Oqu(e.Dn7(3,4,t.dateCreated,"MM/DD/YY LT",!0)),e.xp6(4),e.Oqu(t.fileName),e.xp6(2),e.Q6J("ot-tooltip",o)("trim",!0)}}function At(s,i){1&s&&(e.TgZ(0,"ot-tooltip-content"),e.SDv(1,43),e.qZA())}function gt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",22)(1,"div",23),e.YNc(2,Tt,3,2,"ng-container",24),e.qZA(),e.TgZ(3,"input",25,26),e.NdJ("change",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a._fileUploaded(n))}),e.qZA(),e.TgZ(5,"ot-table",27)(6,"thead")(7,"tr")(8,"th",28),e.SDv(9,29),e.qZA(),e.TgZ(10,"th",28),e.SDv(11,30),e.qZA(),e._UZ(12,"th",31),e.qZA()(),e.TgZ(13,"tbody"),e.YNc(14,St,10,8,"tr",32),e.qZA()(),e.YNc(15,At,2,0,"ng-template",null,33,e.W1O),e.qZA()}if(2&s){const t=e.oxw();e.xp6(1),e.Udp("width",242,"px"),e.xp6(1),e.Q6J("ngIf",t.getUploadState()),e.xp6(12),e.Q6J("ngForOf",t.data)}}function ht(s,i){1&s&&(e.TgZ(0,"div",44)(1,"div",45),e._UZ(2,"ot-icon",46),e.qZA(),e.TgZ(3,"div",47)(4,"p",48),e.SDv(5,49),e.qZA()(),e.TgZ(6,"div",50)(7,"p",51),e.SDv(8,52),e.qZA()(),e.TgZ(9,"div",50)(10,"p",51),e.SDv(11,53),e.qZA()()())}let ze=(()=>{class s extends ge{constructor(t,o,n,a,c){super(),this._apiService=t,this._userSessionService=o,this._simpleMessageManager=n,this._alertMessageService=a,this._toolboxService=c,this.currentStep=0,this.onUpdate=new e.vpe,this.currentAimswebDTO=new oe.g,this.data=[],this.needUploadCSV=!0}ngAfterViewInit(){this.reset(),this._getUploads()}reset(){this.data=[],this.needUploadCSV=!0,this.currentAimswebDTO=new oe.g}canShowNextStep(){return 3!=this.currentStep||!this.needUploadCSV||(this._simpleMessageManager.showSimpleMessageDialog($localize`:analytics/aimswebToolComponent|Text to inform the user to upload at least one CSV file when click on the next arrow:Please upload at least one CSV file before clicking the next arrow.`),!1)}openUrl(t){(0,M.WM)(t)}_getUploads(){this._toolboxService.getAimswebUploads(this._userSessionService.getUserId()).subscribe(t=>{t.hasSuccess()&&(this.data=t.getResults())})}onUpload(){null==this.currentAimswebDTO.status||this.currentAimswebDTO.status==oe.h.NONE?this.uploadInput.nativeElement.click():this._alertMessageService.warning($localize`:analytics/aimswebToolComponent|Warning message to inform that upload are in progress:Upload in progress`)}_fileUploaded(t){t?.target&&t.target.files&&t.target.files.length>0&&(this.currentAimswebDTO.status=oe.h.LOADING,this._toolboxService.uploadAimswebCsv(this._userSessionService.getUserId(),t.target.files[0]).then(o=>{if(this.uploadInput.nativeElement.value=null,o.status&&o.result)this.needUploadCSV=!1,this.currentAimswebDTO.status=oe.h.COMPLETE,this._getUploads(),this.onUpdate.emit();else if(o.message){const n=this._toolboxService.buildErrorMessage(o);
1this._simpleMessageManager.showDetailsDialogWithSize(n.message,n.details,"medium")}this.currentAimswebDTO=new oe.g}).catch(o=>console.error(o)))}getUploadState(){let t="upload";return this.currentAimswebDTO.status==oe.h.COMPLETE?t="excel":this.currentAimswebDTO.status==oe.h.LOADING&&(t="spin"),t}deleteFile(t){this._simpleMessageManager.showYesOrNoDialog($localize`:analytics/aimswebToolComponent|Delete existing CSV file question:Would you like to delete the existing CSV file?`,()=>{this._toolboxService.deleteAimswebUpload(t).subscribe(o=>{o.status&&(this._getUploads(),this.onUpdate.emit())})})}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(b._),e.Y36(F.o),e.Y36(he.$),e.Y36(f.Of),e.Y36(Y.l))},s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-aimsweb-tool"]],viewQuery:function(t,o){if(1&t&&e.Gf(_t,5),2&t){let n;e.iGM(n=e.CRH())&&(o.uploadInput=n.first)}},inputs:{currentStep:"currentStep"},outputs:{onUpdate:"onUpdate"},features:[e.qOj],decls:5,vars:4,consts:function(){let i,t,o,n,a,c,S,I,g,B,z,y;return i=$localize`:analytics/aimswebToolComponent|Description text for Aimsweb integration step 1 informing
2        that after integration you will be able to analyze your results in aimsweb␟a35ffb0030e04c78c5da29387f89a70a4e3a4019␟2175544863347646089: Once you complete this integration process you will be able to analyze your Aimsweb results within your Otus account. `,t=$localize`:analytics/aimswebToolComponent|Information text for Aimsweb integration step 1 informing the
3        Aimsweb basics␟48ec2f6134c3c1368188574cb31aad6ed681e913␟8390489398860047938: Aimsweb is the leading assessment and RTI solution in school today — a complete web-based solution for universal screening, progress monitoring and data management for Grades K-12. Aimsweb provides guidance to administrators and teachers based on accurate, continuous, and direct student assessment. `,o=$localize`:analytics/aimswebToolComponent|Description text for Aimsweb integration step 2 to download
4        the CSV template␟80ae5b26a1282d95f53b596bed9ecc6a9e87ed6c␟7431965062222324287: Download our Aimsweb CSV Template. `,n=$localize`:analytics/aimswebToolComponent|Button to download the Aimsweb CSV template␟9c8da0e7c6d973b98eed95bd8094a83a1b66b954␟7635060387250884622:Aimsweb CSV Template (.csv)`,a=$localize`:analytics/aimswebToolComponent|Text to suggest the user to click on the next arrow after
5        have files ready␟4e7fab60bd109c475180a368e7ab9604e293b087␟5768831791245730941: Once you have your files ready, click the next arrow. `,c=$localize`:analytics/aimswebToolComponent|Text Latest Upload to table column header␟75b43af73f4c687e7c6191701553ae009d7e3058␟782071422231174995: Latest Upload `,S=$localize`:analytics/aimswebToolComponent|Text CSV Files to table column header␟41cf04e715ff14dcb38d9b3443492092ce7b5afd␟1204270539013696058: CSV Files `,I=$localize`:analytics/aimswebToolComponent|Button to upload the Aimsweb CSV template␟6b999061c840d6456c46904153af2b66bb35aa83␟3267543869176711250: Aimsweb CSV Template `,g=$localize`:analytics/aimswebToolComponent|Tooltip for button to delete CSV file␟f2d76f3e7bb121f14359abb4f555ba2616e67e62␟420841840852845879:Delete CSV file`,B=$localize`:analytics/aimswebToolComponent|Congratulations text for step 4␟1806ab00e794b28ab3284db45dc5048cdc22faa6␟5981853497862777265: Congratulations! `,z=$localize`:analytics/aimswebToolComponent|Text to inform that user successfully completed the aimsweb
6          integration␟91ddd934342dfd308040509bcf1a7b7cf9d17675␟7702592184723869843: You have successfully completed the Aimsweb integration process. `,y=$localize`:analytics/aimswebToolComponent|Text to suggest the user to visit the 3rd Part module␟61c01b11afbe33b944c8b06c2e27a6c05c54944b␟5881227544216922703: Visit the 3rd Party module to analyze your Aimsweb data. `,[[1,"aimsweb-tool"],["class","step1",4,"ngIf"],["class","step2",4,"ngIf"],["class","step3",4,"ngIf"],["class","row step4",4,"ngIf"],[1,"step1"],[1,"step1__description"],i,[1,"step1__icon"],["src","/assets/images/school-list/AIMSweb.png"],[1,"step1__info"],t,[1,"step1__link","cursor-pointer",3,"click"],[1,"step2"],[1,"step2__description"],o,[1,"small-centered","text-center","columns"],["download","aimswebUploadTemplate.csv","ot-button","","size","large",1,"ot-aimsweb-template-download-btn",3,"href"],["prefix","fas","icon","download"],n,[1,"step2__description","lr-extra-padding"],a,[1,"step3"],[1,"ot-aimsweb-template-action-container"],[4,"ngIf"],["type","file","hidden","",1,"upload",3,"change"],["fileInput",""],["type","bright","maxHeight","22.5rem"],["width","40%"],c,S,["width","20%"],[4,"ngFor","ngForOf"],["deleteFileTooltip",""],["ot-button","",3,"click",4,"ngIf"],["size","1.25rem",4,"ngIf"],["ot-button","",3,"click"],["prefix","fas",3,"icon"],I,["size","1.25rem"],[1,"aimsweb-file-name"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"ot-tooltip","trim","click"],["prefix","fas","name","trash-alt"],g,[1,"row","step4"],[1,"row","text-center"],["name","check-circle","aria-hidden","true",1,"success-icon"],[1,"row","margin-top-50"],[1,"theme-text-color","text-center","heavy"],B,[1,"row"],[1,"theme-text-color","text-center"],z,y]},template:function(t,o){1&t&&(e.TgZ(0,"div",0),e.YNc(1,ct,9,0,"div",1),e.YNc(2,dt,9,3,"div",2),e.YNc(3,gt,17,4,"div",3),e.YNc(4,ht,12,0,"div",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",1==o.currentStep),e.xp6(1),e.Q6J("ngIf",2==o.currentStep),e.xp6(1),e.Q6J("ngIf",3==o.currentStep),e.xp6(1),e.Q6J("ngIf",4==o.currentStep))},dependencies:[Ce.zx,be.u,ye._,ve.i,Ye.$,ee.J,me.g,l.sg,l.O5,Xe.X],styles:[".row.step4[_ng
6content-%COMP%]   p[_ngcontent-%COMP%]{font-size:1.25em;font-weight:300}.row.step4[_ngcontent-%COMP%]   p.heavy[_ngcontent-%COMP%]{font-weight:400}[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child){padding-block-start:0;padding-block-end:0}[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:last-child{text-align:end}.ot-aimsweb-template-download-btn[_ngcontent-%COMP%]{min-width:19rem}.ot-aimsweb-template-action-container[_ngcontent-%COMP%]{box-sizing:border-box;height:2.5rem;display:flex;justify-content:center;margin-inline-start:auto;margin-inline-end:auto;margin-block-end:1.875rem}"]}),s})();function Ct(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div")(1,"div",3)(2,"div",4),e._UZ(3,"img",5),e.qZA()(),e.TgZ(4,"div",6)(5,"p",7),e.SDv(6,8),e.qZA()(),e.TgZ(7,"div",9)(8,"p",10),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.openUrl("http://www.khanacademy.org/"))}),e._uU(9,"http://www.khanacademy.org/"),e.qZA()()()}}function Ot(s,i){1&s&&(e.TgZ(0,"div")(1,"div",11),e.tHW(2,12),e._UZ(3,"p",13),e.N_p(),e.qZA(),e.TgZ(4,"div",14)(5,"p",15),e._uU(6,"GQY8KP"),e.qZA()()())}function ft(s,i){1&s&&(e.TgZ(0,"div",16)(1,"div",17),e._UZ(2,"ot-icon",18),e.qZA(),e.TgZ(3,"div",6)(4,"p",19),e.SDv(5,20),e.qZA()(),e.TgZ(6,"div",21)(7,"p",22),e.SDv(8,23),e.qZA()(),e.TgZ(9,"div",24)(10,"p",22),e.SDv(11,25),e.qZA()()())}let He=(()=>{class s extends ge{constructor(){super(...arguments),this.currentStep=0}canShowNextStep(){return!0}openUrl(t){(0,M.WM)(t)}}return s.\u0275fac=function(){let i;return function(o){return(i||(i=e.n5z(s)))(o||s)}}(),s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-khan-tool"]],inputs:{currentStep:"currentStep"},features:[e.qOj],decls:4,vars:3,consts:function(){let i,t,o,n,a;return i=$localize`:analytics/khanToolComponent|Description text of step 1 of khan academy to inform all the benefits of Khan academy and how this tool work␟ecb84f97fca533fb8a7006c0371f174c82c60d79␟1631358043753791726:Khan Academy offers practice exercises, instructional videos, and a personalized learning dashboard that empower learners to study at their own pace in and outside the classroom. We tackle math, science, computer programming, history, art history, economics and more. Our math missions guide learners from kindergarten to calculus using state-of-the-art, adapative technology that identifies strengths and learning gaps. We’ve also partnered with institutions like NASA, The Museum of Modern Art, The California Academy of Sciences and MIT to offer specialized content.`,t=$localize`:analytics/khanToolComponent|Description text of step 2 of khan tool to inform how to integrate with Khan Academy␟b19003b01b6d9eb7ba9cfbc540c94347f76683d3␟5151903155539460165:${"\ufffd#3\ufffd"}:START_PARAGRAPH:To integrate with Khan Academy and view your students’ data in Otus, have each of your students add this code to their Khan Academy account as a new class: ${"\ufffd/#3\ufffd"}:CLOSE_PARAGRAPH:`,o=$localize`:analytics/khanToolComponent|Description text of step 3 to Congratulations the khan acadamey integration␟f8303db673f443612ac24f1caba956c63899d201␟5529404902668885795:Congratulations!`,n=$localize`:analytics/khanToolComponent|Description text of step 3 to inform that the user successfully completed the Khan Academy integration␟3307c23fe7cb58feecbf50205cef1d77227beeae␟902597972103524675:You have successfully completed the Khan Academy Integration process.`,a=$localize`:analytics/khanToolComponent|Text to suggest the user to visit the 3rd Part module␟0a45c520be0eaf5e9c647c3001a62b2e808b9583␟9195408296369176024:Visit the 3rd Party module to analyze your Khan Academy data.`,[[1,"khan-tool"],[4,"ngIf"],["class","khan-tool__step3",4,"ngIf"],[1,"row"],[1,"khan-tool__step1__icon"],["src","/assets/images/school-list/khan.png"],[1,"row","padding-t-40"],[1,"theme-text-color","text-center","khan-tool__step1__description"],i,[1,"row","padding-t-20"],[1,"theme-text-color","text-center","khan-tool__step1__link","cursor-pointer",3,"click"],[1,"row","padding-t-85"],t,[1,"theme-text-color","text-center","khan-tool__step2__integration-info"],[1,"row","padding-t-50"],[1,"theme-text-color","text-center","khan-tool__step2__integration-code"],[1,"khan-tool__step3"],[1,"row","text-center"],["name","check-circle","aria-hidden","true",1,"success-icon"],[1,"theme-text-color","text-center","success-info",2,"font-weight","bold"],o,[1,"row","padding-t-10","success-info"],[1,"theme-text-color","text-center"],n,[1,"row","success-info"],a]},template:function(t,o){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Ct,10,0,"div",1),e.YNc(2,Ot,7,0,"div",1),e.YNc(3,ft,12,0,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",1==o.currentStep),e.xp6(1),e.Q6J("ngIf",2==o.currentStep),e.xp6(1),e.Q6J("ngIf",3==o.currentStep))},dependencies:[ee.J,l.O5],encapsulation:2}),s})();var xe=r(31260),ne=r(70655),pe=(()=>{return(s=pe||(pe={})).FALL="Fall",s.WINTER="Winter",s.SPRING="Spring",pe;var s})(),K=(()=>{return(s=K||(K={}))[s.NONE=0]="NONE",s[s.LOADING=1]="LOADING",s[s.COMPLETE=2]="COMPLETE",K;var s})();class se{constructor(i){this.term=null,this.year=i&&Number(i.year)||0,this.termName=null,this.status=K.NONE}clone(){return Object.assign(new se,this)}}(0,ne.gn)([d.autoserialize,(0,ne.w6)("design:type",String)],se.prototype,"term",void 0),(0,ne.gn)([d.autoserialize,(0,ne.w6)("design:type",Number)],se.prototype,"year",void 0),(0,ne.gn)([(0,d.autoserializeAs)("term_name"),(0,ne.w6)("design:type",String)],se.prototype,"termName",void 0);const Et=["fileInput"];function Mt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",6)(1,"div",7),e._UZ(2,"img",8),e.qZA(),e.TgZ(3,"div",9),e.SDv(4,10),e.qZA(),e.TgZ(5,"div",11),e.SDv(6,12),e.qZA(),e.TgZ(7,"div",13),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.openUrl("http://www.nwea.org"))}),e._uU(8," http://www.nwea.org "),e.qZA()()}}function Nt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",14)(1,"div",15),e.SDv(2,16),e.qZA(),e.TgZ(3,"div",17),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.openUrl("https://teach.mapnwea.org"))}),e._uU(4," https://teach.mapnwea.org "),e.qZA(),e.TgZ(5,"div",18),e.SDv(6,19),e.qZA()()}}function Pt(s,i){if(1&s&&(e.TgZ(0,"div",20)(1,"div",21),e.SDv(2,22),e.qZA(),e.TgZ(3,"div",23)(4,"a",24)(5,"ot-icon-label",25),e.SDv(6,26),e.qZA()()()()),2&s){const t=e.oxw();
6e.xp6(4),e.s9C("href",t._apiService.getApiUrl()+"/nwea/get_csv_template",e.LSH)}}function bt(s,i){if(1&s&&(e.TgZ(0,"th"),e._uU(1),e.qZA()),2&s){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function yt(s,i){1&s&&e._UZ(0,"ot-icon",47)}function vt(s,i){1&s&&e._UZ(0,"ot-icon",48)}function xt(s,i){1&s&&e._UZ(0,"ot-icon",49)}const wt=function(s){return{message:s}};function Lt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",43),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2).$implicit,a=e.oxw().$implicit,c=e.oxw(2);return e.KtG(c.onUploadNwea(n,a))}),e.YNc(1,yt,1,0,"ot-icon",44),e.YNc(2,vt,1,0,"ot-icon",45),e.YNc(3,xt,1,0,"ot-icon",46),e.qZA()}if(2&s){const t=e.oxw().ngIf,o=e.oxw().$implicit,n=e.oxw().$implicit;e.oxw();const a=e.MAs(14),c=e.oxw();e.Q6J("trim",!0)("ot-tooltip",a)("tooltipTemplateContext",e.VKq(7,wt,c.hasSyncTerms(o,n)))("disabled","locked"===t),e.xp6(1),e.Q6J("ngIf","upload"===t),e.xp6(1),e.Q6J("ngIf","excel"===t),e.xp6(1),e.Q6J("ngIf","locked"===t)}}function Rt(s,i){1&s&&e._UZ(0,"ot-spinner",50)}function It(s,i){if(1&s&&(e.ynx(0),e.YNc(1,Lt,4,9,"button",41),e.YNc(2,Rt,1,0,"ot-spinner",42),e.BQk()),2&s){const t=i.ngIf;e.xp6(1),e.Q6J("ngIf","spin"!==t),e.xp6(1),e.Q6J("ngIf","spin"===t)}}function Dt(s,i){if(1&s&&(e.TgZ(0,"td",38),e.YNc(1,It,3,2,"ng-container",40),e.qZA()),2&s){const t=i.$implicit,o=e.oxw().$implicit,n=e.oxw(2);e.xp6(1),e.Q6J("ngIf",n.getUploadState(t,o))}}function Ut(s,i){if(1&s&&(e.TgZ(0,"tr",37)(1,"td",38),e._uU(2),e.qZA(),e.YNc(3,Dt,2,1,"td",39),e.qZA()),2&s){const t=i.$implicit,o=e.oxw(2);e.xp6(2),e.AsE("",t,"-",t+1,""),e.xp6(1),e.Q6J("ngForOf",o.terms)}}function $t(s,i){if(1&s&&(e.TgZ(0,"ot-tooltip-content"),e._uU(1),e.qZA()),2&s){const t=e.oxw().message;e.xp6(1),e.hij(" ",t," ")}}function Ft(s,i){1&s&&e.YNc(0,$t,2,1,"ot-tooltip-content",40),2&s&&e.Q6J("ngIf",""!==i.message)}function Bt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",27)(1,"div",28),e.SDv(2,29),e.qZA(),e.TgZ(3,"input",30,31),e.NdJ("change",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a._termFileUploaded(n))}),e.qZA(),e.TgZ(5,"ot-table",32)(6,"thead")(7,"tr")(8,"th"),e.SDv(9,33),e.qZA(),e.YNc(10,bt,2,1,"th",34),e.qZA()(),e.TgZ(11,"tbody"),e.YNc(12,Ut,4,3,"tr",35),e.qZA()(),e.YNc(13,Ft,1,1,"ng-template",null,36,e.W1O),e.qZA()}if(2&s){const t=e.oxw();e.xp6(10),e.Q6J("ngForOf",t.terms),e.xp6(2),e.Q6J("ngForOf",t.years)}}function Zt(s,i){1&s&&(e.TgZ(0,"div",51)(1,"div",52),e._UZ(2,"ot-icon",53),e.qZA(),e.TgZ(3,"div",54)(4,"p",55),e.SDv(5,56),e.qZA()(),e.TgZ(6,"div",57)(7,"p",58),e.SDv(8,59),e.qZA()(),e.TgZ(9,"div",57)(10,"p",58),e.SDv(11,60),e.qZA()()())}let We=(()=>{class s extends ge{constructor(t,o,n,a,c){super(),this._apiService=t,this._toolboxService=o,this._userSessionService=n,this._simpleMessageManager=a,this._alertMessageService=c,this.currentStep=0,this.nweaLastSyncDate=null,this.onUpdate=new e.vpe,this.terms=[pe.FALL,pe.WINTER,pe.SPRING],this.currentNweaDTO=new se,this.nweaData=[],this.needUploadCSV=!0,this.hasSyncResults=!1,this.hasDataFromSync=[]}ngOnInit(){let t;const o=new Date,n=new Date("08/01/"+o.getFullYear());t=o>=n?o.getFullYear():o.getFullYear()-1,this.years=Array.from({length:t+1-2010},(c,S)=>t-S),this.canAccessControlCenter=this._userSessionService.isMainAdmin(),this.cannotAccessControlCenter=this._userSessionService.isTeacher()||this._userSessionService.isCoAdmin()}ngAfterViewInit(){this.reset(),this._getUploadTerms()}reset(){this.nweaData=[],this.needUploadCSV=!0,this.currentNweaDTO=new se}canShowNextStep(){return 4!=this.currentStep||!this.needUploadCSV||(this._simpleMessageManager.showSimpleMessageDialog($localize`:analytics/nweaComponent|Text to inform the user to upload at least one CSV file when click on the next arrow:Please upload at least one CSV file before clicking the next arrow.`),!1)}openUrl(t){(0,M.WM)(t)}onUploadNwea(t,o){"Fall"!==t&&(o+=1);const n=this._hasUploadedTerms(t,o);this.hasSyncResults=this.hasSyncData(t,o),n?this._deleteTerm(t,o):this.hasSyncResults||(this.currentNweaDTO.status==K.NONE?(this.currentNweaDTO.term=t,this.currentNweaDTO.year=o,this.uploadInput.nativeElement.click()):this._alertMessageService.warning($localize`:analytics/nweaComponent|Warning message to inform that upload are in progress:Upload in progress`))}_termFileUploaded(t){if(t?.target&&t.target.files&&t.target.files.length>0){const o=t.target.files[0];this.currentNweaDTO.status=K.LOADING,this._toolboxService.uploadNWEACsv(this._userSessionService.getUserId(),o).then(n=>{if(this.uploadInput.nativeElement.value=null,n.status&&n.result)this.needUploadCSV=!1,this.currentNweaDTO.status=K.COMPLETE,this._getUploadTerms();else if(n.message){const a=this._toolboxService.buildErrorMessage(n);
6this._simpleMessageManager.showDetailsDialogWithSize(a.message,a.details,"medium")}this.currentNweaDTO=new se,this.onUpdate.emit()}).catch(n=>console.error(n))}}_deleteTerm(t,o){this._simpleMessageManager.showYesOrNoDialog($localize`:analytics/nweaComponent|Delete existing CSV file question:Would you like to delete the existing CSV file?`,()=>{this.currentNweaDTO.status=K.LOADING,this._toolboxService.deleteNWEATerm(t,o).subscribe(n=>{n.status&&(this.currentNweaDTO.status=K.NONE,this._getUploadTerms(),this.onUpdate.emit())})})}getUploadState(t,o){let n="upload";if(this.nweaLastSyncDate&&this.termIdsYear)for(let a=0;a<this.termIdsYear.length;a++)(this.termIdsYear[a].term_id==t&&"Spring"==this.termIdsYear[a].term_id&&this.termIdsYear[a].year==o+1||this.termIdsYear[a].term_id==t&&"Winter"==this.termIdsYear[a].term_id&&this.termIdsYear[a].year==o+1||this.termIdsYear[a].term_id==t&&"Fall"==this.termIdsYear[a].term_id&&this.termIdsYear[a].year==o)&&(n="locked");return"Fall"!==t&&(o+=1),this.currentNweaDTO.term==t&&this.currentNweaDTO.year==o?this.currentNweaDTO.status==K.COMPLETE?n="excel":this.currentNweaDTO.status==K.LOADING&&(n="spin"):(0,xe.Z)(this.nweaData,c=>c.term==t&&c.year==o).length>0&&(n="excel"),n}_hasUploadedTerms(t,o){return(0,xe.Z)(this.nweaData,a=>a.term==t&&a.year==o).length>0}hasSyncData(t,o){if(this.termIdsYear){for(let n=0;n<this.termIdsYear.length;n++)this.termIdsYear[n].term_id==t&&this.termIdsYear[n].year==o&&this.hasDataFromSync.push(o);return this.hasDataFromSync.length>0}}_getUploadTerms(){this._toolboxService.getNWEAUploadedTerms(this._userSessionService.getUserId()).subscribe(t=>{t.status&&(this.nweaData=t.result)})}hasSyncTerms(t,o){let n=$localize`:analytics/nweaComponent|Text Upload CSV file to tooltip title:Upload CSV file`;"Fall"!==t&&(o+=1);const a=(0,xe.Z)(this.nweaData,c=>c.term==t&&c.year==o);if(this.hasSyncResults=this.hasSyncData(t,o),a.length>0&&(n=""),this.nweaLastSyncDate&&this.termIdsYear&&this.hasSyncResults)for(let c=0;c<this.termIdsYear.length;c++)this.termIdsYear[c].term_id==t&&this.termIdsYear[c].year==o&&(n=$localize`:analytics/nweaComponent|Text to tooltip title when data was synced via NWEA integration:Data was synced via NWEA integration`);return n}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(b._),e.Y36(Y.l),e.Y36(F.o),e.Y36(he.$),e.Y36(f.Of))},s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-nwea-tool"]],viewQuery:function(t,o){if(1&t&&e.Gf(Et,5),2&t){let n;e.iGM(n=e.CRH())&&(o.uploadInput=n.first)}},inputs:{currentStep:"currentStep",nweaLastSyncDate:"nweaLastSyncDate",termIdsYear:"termIdsYear"},outputs:{onUpdate:"onUpdate"},features:[e.qOj],decls:6,vars:5,consts:function(){let i,t,o,n,a,c,S,I,g,B,z;return i=$localize`:analytics/nweaComponent|Text to suggest the user to click on the next arrow to manually
7        upload data␟80cbf49e7f409bc23338010ca67871ae44b7d830␟4978708646686258561: To manually upload data, click the arrow to continue `,t=$localize`:analytics/nweaComponent|Text to inform what is NWEA and others trademarks␟e0a0acc43851869da80a572daac38ed86d5081ca␟4866492602212602168: Measures of Academic Progress, MAP, Northwest Evaluation Association and NWEA are trademarks or registered trademarks of NWEA in the U.S. and in other countries. `,o=$localize`:analytics/nweaComponent|Text to suggest the user to navigate to NWEA site to download user
8        results␟1e96f2b0e79f3f49d8a01c27a1dad2e009d4e119␟7508482412979244803: Visit the NWEA site to download your results in the ComboStudentAssessment.csv format: `,n=$localize`:analytics/nweaComponent|Text to inform the user that the results include all years and terms␟994ddd74946b94893e27722257e8c482d2227dd0␟5599651319837050902: Include all years and terms you wish to analyze in Otus. `,a=$localize`:analytics/nweaComponent|Text to suggest the user to download NEWA CSV template to know how
9        to upload data␟e394fc8a0308c44d98efc0c900222f3243c6aa81␟7097343988030722199: Download our NWEA CSV Template below for each term you would like to upload and analyze in Otus. `,c=$localize`:analytics/nweaComponent|Button to download NWEA CSV template␟a42f9e3b4c9d730a132f8bd954a4ccbceed64229␟3896978417176112189:NWEA CSV Template (.csv)`,S=$localize`:analytics/nweaComponent|Text to inform the user upload their files clicking on the
10        corresponding term upload buttons below␟17cbcedf89c7080c05ca6abbc1dede347469ae4b␟6693685815424684552: Upload your files below by clicking on the corresponding term upload buttons: `,I=$localize`:analytics/nweaComponent|Text for School Year list item␟dcd73d2a310e46a0994045d80e2b5a7b5bb11d92␟5878501602647427971: School Year `,g=$localize`:analytics/nweaComponent|Text to inform user that their file has been uploaded successfully␟2fb54c44ea3477d7f1550842c58acb061371a567␟6206030150535364884: Your file has been uploaded successfully. `,B=$localize`:analytics/nweaComponent|Text to inform user that NWEA integration has been successfully␟3bc19fd08e6504ccd7a97ebbf134fb06db00c595␟481631601552277616: You have successfully completed the NWEA Integration process. `,z=$localize`:analytics/nweaComponent|Text to suggest the user to visit the 3rd Part module␟509ee67163c2dc0ae1bf6e400a631d8d077227f4␟4253022093555984793: Visit the 3rd Party module to analyze and manage your NWEA data. `,[[1,"nwea-tool"],["class","step1",4,"ngIf"],["class","row step2",4,"ngIf"],["class","row step3",4,"ngIf"],["class","row step4",4,"ngIf"],["class","row step5",4,"ngIf"],[1,"step1"],[1,"step1__nwea-icon"],["src","/assets/images/school-list/nwea.png"],[1,"step1__description"],i,[1,"step1__nwea-info"],t,[1,"step1__nwea-link","cursor-pointer",3,"click"],[1,"row","step2"],[1,"step2__description"],o,[1,"step2__nwea-link","cursor-pointer",3,"click"],[1,"step2__nwea-info"],n,[1,"row","step3"],[1,"step3__description"],a,[1,"step3__btn-download-template","small-5","small-centered","columns"],["ot-button","","size","large","download","NWEAUploadTemplate.csv",3,"href"],["prefix","fas","icon","download"],c,[1,"row","step4"],[1,"step4__description"],S,["type","file","hidden","",1,"upload",3,"change"],["fileInput",""],["type","bright","maxHeight","22.5rem"],I,[4,"ngFor","ngForOf"],["class","tl-list",4,"ngFor","ngForOf"],["syncTerm",""],[1,"tl-list"],[1,"list-item"],["class","list-item",4,"ngFor","ngForOf"],[4,"ngIf"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"trim","ot-tooltip","tooltipTemplateContext","disabled","click",4,"ngIf"],["size","1.25rem",4,"ngIf"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"trim","ot-tooltip","tooltipTemplateContext","disabled","click"],["prefix","fas","name","upload",4,"ngIf"],["prefix","fas","name","file-excel",4,"ngIf"],["prefix","fas","name","key",4,"ngIf"],["prefix","fas","name","upload"],["prefix","fas","name","file-excel"],["prefix","fas","name","key"],["size","1.25rem"],[1,"row","step5"],[1,"row","text-center"],["name","check-circle","prefix","far","aria-hidden","true",1,"success-icon"],[1,"row","margin-top-50"],[1,"theme-text-color","text-center",2,"font-size","20px","font-weight","bolder"],g,[1,"row"],[1,"theme-text-color","text-center",2,"font-size","20px"],B,z]},template:function(t,o){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Mt,9,0,"div",1),e.YNc(2,Nt,7,0,"div",2),e.YNc(3,Pt,7,1,"div",3),e.YNc(4,Bt,15,2,"div",4),e.YNc(5,Zt,12,0,"div",5),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",1==o.currentStep),e.xp6(1),e.Q6J("ngIf",2==o.currentStep),e.xp6(1),e.Q6J("ngIf",3==o.currentStep),e.xp6(1),e.Q6J("ngIf",4==o.currentStep),e.xp6(1),e.Q6J("ngIf",5==o.currentStep))},dependencies:[Ce.zx,be.u,ye._,ve.i,Ye.$,ee.J,me.g,l.sg,l.O5],styles:["[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child){padding-block-start:0;padding-block-end:0}"]}),s})();var q=(()=>{return(s=q||(q={}))[s.NONE=0]="NONE",s[s.LOADING=1]="LOADING",s[s.COMPLETE=2]="COMPLETE",q;var s})();class ue{constructor(i){this.year=i?.year||"",this.status=q.NONE}clone(){return Object.assign(new ue,this)}}(0,ne.gn)([d.autoserialize,(0,ne.w6)("design:type",String)],ue.prototype,"year",void 0);const Yt=["fileInput"];function Gt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6),e.SDv(2,7),e.qZA(),e.TgZ(3,"div",8),e._UZ(4,"img",9),e.qZA(),e.TgZ(5,"div",10),e.SDv(6,11),e.qZA(),e.TgZ(7,"div",12),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.openUrl("https://parcc-assessment.org/"))}),e._uU(8," https://parcc-assessment.org/ "),e.qZA()()}}function kt(s,i){if(1&s&&(e.TgZ(0,"div",13)(1,"div",14),e.SDv(2,15),e.qZA(),e.TgZ(3,"div",16)(4,"a",17)(5,"ot-icon-label",18),e.SDv(6,19),e.qZA()()(),e.TgZ(7,"div",20),e.SDv(8,21),e.qZA()()),2&s){const t=e.oxw();
10e.xp6(4),e.s9C("href",t._apiService.getApiUrl()+"/parcc/get_csv_template",e.LSH)}}function Xt(s,i){1&s&&e._UZ(0,"ot-icon",42)}function zt(s,i){1&s&&e._UZ(0,"ot-icon",43)}const Ht=function(s){return{show:s}};function Wt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",39),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2).$implicit,a=e.oxw(2);return e.KtG(a.onUpload(n))}),e.YNc(1,Xt,1,0,"ot-icon",40),e.YNc(2,zt,1,0,"ot-icon",41),e.qZA()}if(2&s){const t=e.oxw().ngIf,o=e.oxw().$implicit;e.oxw();const n=e.MAs(16),a=e.oxw();e.Q6J("trim",!0)("ot-tooltip",n)("tooltipTemplateContext",e.VKq(6,Ht,!a._hasUploadedYear(o)))("disabled","excel"===t),e.xp6(1),e.Q6J("ngIf","upload"===t),e.xp6(1),e.Q6J("ngIf","excel"===t)}}function Jt(s,i){1&s&&e._UZ(0,"ot-spinner",44)}function Qt(s,i){if(1&s&&(e.ynx(0),e.YNc(1,Wt,3,8,"button",37),e.YNc(2,Jt,1,0,"ot-spinner",38),e.BQk()),2&s){const t=i.ngIf;e.xp6(1),e.Q6J("ngIf","spin"!==t),e.xp6(1),e.Q6J("ngIf","spin"===t)}}function Vt(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",45),e.NdJ("click",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a._deleteYear(n))}),e._UZ(1,"ot-icon",46),e.qZA()}if(2&s){e.oxw(2);const t=e.MAs(18);e.Q6J("trim",!0)("ot-tooltip",t)}}function Kt(s,i){if(1&s&&(e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td"),e.YNc(4,Qt,3,2,"ng-container",35),e.qZA(),e.TgZ(5,"td"),e.YNc(6,Vt,2,2,"button",36),e.qZA()()),2&s){const t=i.$implicit,o=e.oxw(2);e.xp6(2),e.AsE("",t,"-",t+1,""),e.xp6(2),e.Q6J("ngIf",o.getUploadState(t)),e.xp6(2),e.Q6J("ngIf",o._hasUploadedYear(t))}}function qt(s,i){1&s&&(e.TgZ(0,"ot-tooltip-content"),e.SDv(1,47),e.qZA())}function jt(s,i){1&s&&e.YNc(0,qt,2,0,"ot-tooltip-content",35),2&s&&e.Q6J("ngIf",i.show)}function eo(s,i){1&s&&(e.TgZ(0,"ot-tooltip-content"),e.SDv(1,48),e.qZA())}function to(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",22)(1,"div",23),e.SDv(2,24),e.qZA(),e.TgZ(3,"input",25,26),e.NdJ("change",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a._fileUploaded(n))}),e.qZA(),e.TgZ(5,"ot-table",27)(6,"thead")(7,"tr")(8,"th",28),e.SDv(9,29),e.qZA(),e.TgZ(10,"th",28),e.SDv(11,30),e.qZA(),e._UZ(12,"th",31),e.qZA()(),e.TgZ(13,"tbody"),e.YNc(14,Kt,7,4,"tr",32),e.qZA()(),e.YNc(15,jt,1,1,"ng-template",null,33,e.W1O),e.YNc(17,eo,2,0,"ng-template",null,34,e.W1O),e.qZA()}if(2&s){const t=e.oxw();e.xp6(14),e.Q6J("ngForOf",t.years)}}function oo(s,i){1&s&&(e.TgZ(0,"div",49)(1,"div",50),e._UZ(2,"ot-icon",51),e.qZA(),e.TgZ(3,"div",52)(4,"p",53),e.SDv(5,54),e.qZA()(),e.TgZ(6,"div",55)(7,"p",56),e.SDv(8,57),e.qZA()(),e.TgZ(9,"div",55)(10,"p",56),e.SDv(11,58),e.qZA()()())}let Je=(()=>{class s extends ge{constructor(t,o,n,a,c){super(),this._apiService=t,this._simpleMessageManager=o,this._alertMessageService=n,this._userSessionService=a,this._toolboxService=c,this.currentStep=0,this.onUpdate=new e.vpe,this.years=[],this.currentParccDTO=new ue,this.parccData=[],this.needUploadCSV=!0}ngAfterViewInit(){let t;this.reset();const o=new Date,n=new Date("08/01/"+o.getFullYear());t=o>=n?o.getFullYear():o.getFullYear()-1,this.years=Array.from({length:t+1-2010},(c,S)=>t-S),this._getUploadYears()}reset(){this.parccData=[],this.needUploadCSV=!0,this.currentParccDTO=new ue}canShowNextStep(){return 3!=this.currentStep||!this.needUploadCSV||(this._simpleMessageManager.showSimpleMessageDialog($localize`:analytics/parccToolComponent|Text to suggest the user to upload at least one CSV file:Please upload at least one CSV file before clicking the next arrow.`),!1)}openUrl(t){(0,M.WM)(t)}onUpload(t){this._hasUploadedYear(t)?this._deleteYear(t):this.currentParccDTO.status==q.NONE?(this.currentParccDTO.year=t+"-"+(t+1),this.uploadInput.nativeElement.click()):this._alertMessageService.warning($localize`:analytics/parccToolComponent|Warning message to inform that upload are in progress:Upload in progress`)}_fileUploaded(t){if(t?.target&&t.target.files&&t.target.files.length>0){const o=[];o[this.currentParccDTO.year]=t.target.files[0],this.currentParccDTO.status=q.LOADING,this._toolboxService.uploadPARCCFiles(this._userSessionService.getUserId(),o).then(n=>{if(this.uploadInput.nativeElement.value=null,n.status&&n.result)this.needUploadCSV=!1,this.currentParccDTO.status=q.COMPLETE,this._getUploadYears();else if(n.message){const a=this._toolboxService.buildErrorMessage(n);
10this._simpleMessageManager.showDetailsDialogWithSize(a.message,a.details,"medium")}this.currentParccDTO=new ue,this.onUpdate.emit()}).catch(n=>console.error(n))}}_deleteYear(t){const o=t+"-"+(t+1);this._simpleMessageManager.showYesOrNoDialog($localize`:analytics/parccToolComponent|Delete the existing CSV file question:Would you like to delete the existing CSV file?`,()=>{this.currentParccDTO.status=q.LOADING,this._toolboxService.deletePARCCFileByYear(o,this._userSessionService.getUserId()).subscribe(n=>{n.status&&(this.currentParccDTO.status=q.NONE,this._getUploadYears(),this.onUpdate.emit())})})}getUploadState(t){let o="upload";return this.currentParccDTO.year==t+"-"+(t+1)?this.currentParccDTO.status==q.COMPLETE?o="excel":this.currentParccDTO.status==q.LOADING&&(o="spin"):this._hasUploadedYear(t)&&(o="excel"),o}_hasUploadedYear(t){return(0,xe.Z)(this.parccData,n=>n.year==t+"-"+(t+1)).length>0}_getUploadYears(){this._toolboxService.getPARCCUploads(this._userSessionService.getUserId()).subscribe(t=>{t.status&&(this.parccData=t.result)})}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(b._),e.Y36(he.$),e.Y36(f.Of),e.Y36(F.o),e.Y36(Y.l))},s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-parcc-tool"]],viewQuery:function(t,o){if(1&t&&e.Gf(Yt,5),2&t){let n;e.iGM(n=e.CRH())&&(o.uploadInput=n.first)}},inputs:{currentStep:"currentStep"},outputs:{onUpdate:"onUpdate"},features:[e.qOj],decls:5,vars:4,consts:function(){let i,t,o,n,a,c,S,I,g,B,z,y,X;return i=$localize`:analytics/parccToolComponent|Description text for Parcc integration step 1 informing that
11        after integration the user will be able to analyze the PARCC Assessment results␟a05b0b336bb5ba9d512f36b3acb72e3ea0cc0d2d␟7936184920476565534: Once you complete this integration process you will be able to analyze your PARCC Assessment results within Otus. `,t=$localize`:analytics/parccToolComponent|Information text for aimsweb integration step 1 informing the
12        PARCC basic␟dd81b22964ab273ecf51f7fc61bdf0d2b3eeac09␟6070941952734288942: The Partnership for Assessment of Readiness for College and Careers (PARCC) is a group of states working together to develop a modern assessment that replaces previous state standardized tests. The PARCC test helps ensure that all students, regardless of income, family background or geography, have equal access to a world-class education that will prepare them for success after high school in college and/or careers. `,o=$localize`:analytics/parccToolComponent|Text to suggest user to download the PARCC CSV template␟28b3cb9462a97c0388930c416f4bd9f184ad1bf2␟8637889849468218356: Download our PARCC CSV Template. `,n=$localize`:analytics/parccToolComponent|Button to download PARCC CSV Template file␟500b087ed606a1982206b8735e2b4a3f387ff2dc␟5574339648200865691:PARCC CSV Template (.csv)`,a=$localize`:analytics/parccToolComponent|Text to suggest the user to click on the next arrow after have
13        files ready␟65b88aeaf9991fa9ae2020b50643c0fe35a787be␟2770251761074216654: Once you have your files ready, click the next arrow. `,c=$localize`:analytics/parccToolComponent|Text to inform the user upload their files clicking on the
14        corresponding term upload buttons below␟92d5104b0b61f9ea395753d3f7af216c46a7bb19␟1752565953020781547: Upload your files below by clicking on the corresponding term buttons: `,S=$localize`:analytics/parccToolComponent|Text School Year to table column header␟e3d7fc3856ea6350b08625c5a971d2f16f8c0ede␟1700710280942690099: School Year `,I=$localize`:analytics/parccToolComponent|Text CSV Files to table column header␟ac627e5d77d321e159c0caafc3b4b4fd155be91e␟7429062545696957579: CSV Files `,g=$localize`:analytics/parccToolComponent|Tooltip for button to upload CSV file␟806c9f41e68f564b993f9e369b9317a64a0226f2␟7484540908836739350:Upload CSV file`,B=$localize`:analytics/parccToolComponent|Tooltip for button to delete CSV file␟0d37a095b06d8cc6c18f0328297c605c9bf92e64␟6645633847536107400:Delete CSV file`,z=$localize`:analytics/parccToolComponent|Description text to Congratulations the PARCC Assessment
15          integration␟8481f2a86bad872093a44fa9895fc4217934965d␟2983273467691262978: Congratulations! `,y=$localize`:analytics/parccToolComponent|Description text to inform that the user successfully
16          completed the PARCC Assessment integration␟a85103c3f40d5f916fedce29c5280f866820a8ec␟4697167714519176719: You have successfully completed the PARCC Integration process. `,X=$localize`:analytics/parccToolComponent|Text to suggest the user to visit the 3rd Part module␟7fc5228914a62916535a7b9784bbe97e68e54cca␟4429181111662110732
16: Visit the 3rd Party module to analyze and manage your PARCC data. `,[[1,"parcc-tool"],["class","step1",4,"ngIf"],["class","step2",4,"ngIf"],["class","step3",4,"ngIf"],["class","row step4",4,"ngIf"],[1,"step1"],[1,"step1__description"],i,[1,"step1__icon","margin-top-20"],["src","/assets/images/school-list/parcc.jpg"],[1,"step1__info","margin-top-20"],t,[1,"step1__link","cursor-pointer",3,"click"],[1,"step2"],[1,"step2__description"],o,[1,"step2__btn-download-template","small-5","small-centered","text-center","columns"],["ot-button","","size","large","download","PARCCUploadTemplate.csv",3,"href"],["prefix","fas","icon","download"],n,[1,"step2__description","lr-extra-padding"],a,[1,"step3"],[1,"step3__description"],c,["type","file","hidden","",1,"upload",3,"change"],["fileInput",""],["type","bright","maxHeight","22.5rem"],["width","40%"],S,I,["width","20%"],[4,"ngFor","ngForOf"],["uploaded",""],["deleteFile",""],[4,"ngIf"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"trim","ot-tooltip","click",4,"ngIf"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"trim","ot-tooltip","tooltipTemplateContext","disabled","click",4,"ngIf"],["size","1.25rem",4,"ngIf"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"trim","ot-tooltip","tooltipTemplateContext","disabled","click"],["prefix","fas","name","upload",4,"ngIf"],["prefix","fas","name","file-excel",4,"ngIf"],["prefix","fas","name","upload"],["prefix","fas","name","file-excel"],["size","1.25rem"],["ot-button","","color","transparent","tooltipPosition","center-bottom",3,"trim","ot-tooltip","click"],["prefix","fas","name","trash-alt"],g,B,[1,"row","step4"],[1,"row","text-center"],["name","check-circle","aria-hidden","true",1,"success-icon"],[1,"row","margin-top-50"],[1,"theme-text-color","text-center",2,"font-size","20px","font-weight","normal"],z,[1,"row"],[1,"theme-text-color","text-center",2,"font-size","20px","font-weight","300"],y,X]},template:function(t,o){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Gt,9,0,"div",1),e.YNc(2,kt,9,1,"div",2),e.YNc(3,to,19,1,"div",3),e.YNc(4,oo,12,0,"div",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",1==o.currentStep),e.xp6(1),e.Q6J("ngIf",2==o.currentStep),e.xp6(1),e.Q6J("ngIf",3==o.currentStep),e.xp6(1),e.Q6J("ngIf",4==o.currentStep))},dependencies:[Ce.zx,be.u,ye._,ve.i,Ye.$,ee.J,me.g,l.sg,l.O5],styles:["[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child){padding-block-start:0;padding-block-end:0}[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:last-child{text-align:end}"]}),s})();const no=["fileInput"];function so(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",8)(2,"p",9),e.SDv(3,10),e.qZA()(),e.TgZ(4,"div",11)(5,"div",12),e._UZ(6,"img",13),e.qZA()(),e.TgZ(7,"div",14)(8,"p",9),e.SDv(9,15),e.qZA()(),e.TgZ(10,"div",8)(11,"p",16),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.openUrl("https://smarterbalanced.org/"))}),e._uU(12," http://www.smarterbalanced.org/ "),e.qZA()()()}}function ao(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",17)(1,"div",8)(2,"p",18),e.SDv(3,19),e.qZA()(),e.TgZ(4,"div",20)(5,"button",21),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.downloadCSV())}),e.TgZ(6,"ot-icon-label",22),e.SDv(7,23),e.qZA()()(),e.TgZ(8,"div",24)(9,"p",18),e.SDv(10,25),e.qZA()()()}}function io(s,i){1&s&&(e.tHW(0,38,1),e.ynx(1),e._UZ(2,"ot-icon",42),e.BQk(),e.N_p())}function lo(s,i){1&s&&(e.tHW(0,38,2),e._UZ(1,"ot-icon",43),e.N_p())}function ro(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",44),e.NdJ("click",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a._deleteYear(n))}),e.tHW(1,45),e._UZ(2,"ot-icon",46),e.N_p(),e.qZA()}if(2&s){e.oxw(3);const t=e.MAs(7);e.Q6J("ot-tooltip",t)}}function _o(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"tr")(1,"td"),e._uU(2),e.qZA(),e.TgZ(3,"td")(4,"button",37),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw(2);return e.KtG(c._onUpload(a))}),e.tHW(5,38),e.YNc(6,io,3,0,"ng-container",39),e.YNc(7,lo,2,0,"ng-template",null,40,e.W1O),e.N_p(),e.qZA()(),e.TgZ(9,"td"),e.YNc(10,ro,3,1,"button",41),e.qZA()()}if(2&s){const t=i.$implicit,o=e.MAs(8),n=e.oxw(2),a=e.MAs(5);e.xp6(2),e.AsE("",t,"-",t+1,""),e.xp6(2),e.Q6J("ot-tooltip",a)("disabled",n._hasUploadedYear(t)),e.xp6(2),e.Q6J("ngIf",n._hasUploadedYear(t))("ngIfElse",o),e.xp6(4),e.Q6J("ngIf",n._hasUploadedYear(t))}}
16function co(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",26)(1,"div",8)(2,"p",9),e.SDv(3,27),e.qZA()(),e.TgZ(4,"input",28,29),e.NdJ("change",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a._fileUploaded(n))}),e.qZA(),e.TgZ(6,"div",30)(7,"ot-table",31)(8,"thead")(9,"tr")(10,"th",32),e.SDv(11,33),e.qZA(),e.TgZ(12,"th",32),e.SDv(13,34),e.qZA(),e._UZ(14,"th",35),e.qZA()(),e.TgZ(15,"tbody"),e.YNc(16,_o,11,7,"tr",36),e.qZA()()()()}if(2&s){const t=e.oxw();e.xp6(16),e.Q6J("ngForOf",t.years)}}function mo(s,i){1&s&&(e.TgZ(0,"ot-tooltip-content"),e.SDv(1,47),e.qZA())}function po(s,i){1&s&&(e.TgZ(0,"ot-tooltip-content"),e.SDv(1,48),e.qZA())}function uo(s,i){1&s&&(e.TgZ(0,"div",49)(1,"div",50),e._UZ(2,"ot-icon",51),e.qZA(),e.TgZ(3,"div",52)(4,"p",53),e.SDv(5,54),e.qZA()(),e.TgZ(6,"div",8)(7,"p",55),e.SDv(8,56),e.qZA(),e.TgZ(9,"p",55),e.SDv(10,57),e.qZA()()())}let Qe=(()=>{class s extends ge{constructor(t,o,n,a){super(),this._toolboxService=t,this._alertMessageService=o,this._simpleMessageManager=n,this._userSessionService=a,this.currentStep=0,this.newDataUploaded=new e.vpe,this.years=[],this.needUploadCSV=!0}ngOnInit(){let t;const o=new Date,n=new Date("08/01/"+o.getFullYear());t=o>=n?o.getFullYear():o.getFullYear()-1,this.years=Array.from({length:t+1-2010},(c,S)=>t-S),this.getUploadedYears()}ngAfterViewInit(){this.needUploadCSV=!0}canShowNextStep(){return 3!=this.currentStep||!this.needUploadCSV||(this._simpleMessageManager.showSimpleMessageDialog($localize`:analytics/sbacToolComponent|Text to suggest the user to upload at least one CSV file:Please upload at least one CSV file before clicking the next arrow.`),!1)}openUrl(t){(0,M.WM)(t)}downloadCSV(){const t=$localize`:analytics/sbacToolComponent|Part of the text to set filename after download the csv file:SBAC_Template`;de.o.fromStringArray([[$localize`:analytics/sbacToolComponent|RecordType Column Header for CSV file:RecordType`,$localize`:analytics/sbacToolComponent|Student Email Column Header for CSV file:Student Email`,$localize`:analytics/sbacToolComponent|UIN Column Header for CSV file:UIN`,$localize`:analytics/sbacToolComponent|SIS_ID Column Header for CSV file:SIS_ID`,$localize`:analytics/sbacToolComponent|Student_Last_Name Column Header for CSV file:Student_Last_Name`,$localize`:analytics/sbacToolComponent|Student_First_Name Column Header for CSV file:Student_First_Name`,$localize`:analytics/sbacToolComponent|GradeAssessed Column Header for CSV file:GradeAssessed`,$localize`:analytics/sbacToolComponent|TestedLEAName1 Column Header for CSV file:TestedLEAName1`,$localize`:analytics/sbacToolComponent|TestedSchoolName1 Column Header for CSV file:TestedSchoolName1`,$localize`:analytics/sbacToolComponent|TestCompletionDate1 Column Header for CSV file:TestCompletionDate1`,$localize`:analytics/sbacToolComponent|TestCompletionDate2 Column Header for CSV file:TestCompletionDate2`,$localize`:analytics/sbacToolComponent|SmarterClaimScore1 Column Header for CSV file:SmarterClaimScore1`,$localize`:analytics/sbacToolComponent|SmarterClaim1PerformanceLevel Column Header for CSV file:SmarterClaim1PerformanceLevel`,$localize`:analytics/sbacToolComponent|SmarterClaimScore2 Column Header for CSV file:SmarterClaimScore2`,$localize`:analytics/sbacToolComponent|SmarterClaim2PerformanceLevel Column Header for CSV file:SmarterClaim2PerformanceLevel`,$localize`:analytics/sbacToolComponent|SmarterClaimScore3 Column Header for CSV file:SmarterClaimScore3`,$localize`:analytics/sbacToolComponent|SmarterClaim3PerformanceLevel Column Header for CSV file:SmarterClaim3PerformanceLevel`,$localize`:analytics/sbacToolComponent|SmarterClaimScore4 Column Header for CSV file:SmarterClaimScore4`,$localize`:analytics/sbacToolComponent|SmarterClaim4PerformanceLevel Column Header for CSV file:SmarterClaim4PerformanceLevel`,$localize`:analytics/sbacToolComponent|ScaleScore Column Header for CSV file:ScaleScore`,$localize`:analytics/sbacToolComponent|SmarterStandardErrorMeasurement-SEM Column Header for CSV file:SmarterStandardErrorMeasurement-SEM`,$localize`:analytics/sbacToolComponent|AchievementLevels Column Header for CSV file:AchievementLevels`]],t+".csv")}getUploadedYears(){this._toolboxService.getSBACUploadsByUser(this._userSessionService.getUserId()).subscribe(t=>{this.yearsUploaded=t})}_hasUploadedYear(t){return!!this.yearsUploaded&&this.yearsUploaded[t]}_onUpload(t){this.yearsUploaded&&!this.yearsUploaded[t]&&(this.selectedYear=t,this.uploadInput.nativeElement.click())}_fileUploaded(t){if(t?.target&&t.target.files&&t.target.files.length>0){const o=[];o[0]=t.target.files[0],this._toolboxService.uplaodSBACFile(o,this.selectedYear).then(n=>{var a;if(this.uploadInput.nativeElement.value=null,n?.success){if(this.needUploadCSV=!1,null!==(a=n.invalidRows)&&void 0!==a&&a.length){let c="";n.invalidRows.forEach(S=>{c+="<b>Row "+S.row+":</b> "+S.error+"<br>"}
16),this._simpleMessageManager.showDetailsDialog(n.invalidRows.length+$localize`:analytics/sbacToolComponent|Text to inform the count of rows that not uploaded: rows were not uploaded due to errors`,c)}else this._alertMessageService.success($localize`:analytics/sbacToolComponent|Success message to inform that upload file successfully:Upload Successful`);n.validRows&&n.validRows.length>0&&this.newDataUploaded.emit(this.selectedYear)}else{const c=n.error?n.error:$localize`:analytics/sbacToolComponent|Error message to inform that upload failed with unspecified error:Unspecified Error`;this._alertMessageService.error(c,$localize`:analytics/sbacToolComponent|Error message to inform that upload failed:Upload failed`)}this.getUploadedYears()}).catch(n=>console.error(n))}}_deleteYear(t){this._simpleMessageManager.showYesOrNoDialog($localize`:analytics/sbacToolComponent|Delete existing CSV file question:Would you like to delete the existing CSV file?`,()=>{this._toolboxService.deleteSBACUpload(t).subscribe(()=>{this.getUploadedYears()})})}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Y.l),e.Y36(f.Of),e.Y36(he.$),e.Y36(F.o))},s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-sbac-tool"]],viewQuery:function(t,o){if(1&t&&e.Gf(no,5),2&t){let n;e.iGM(n=e.CRH())&&(o.uploadInput=n.first)}},inputs:{currentStep:"currentStep"},outputs:{newDataUploaded:"newDataUploaded"},features:[e.qOj],decls:9,vars:4,consts:function(){let i,t,o,n,a,c,S,I,g,B,z,y,X,U,Ae;return i=$localize`:analytics/sbacToolComponent|Description text for SBAC integration step 1 informing that
17          after integration the user will be able to analyze the SBAC Assessment results␟009150584c1f4d6042d464c47b17ab9f90ed26ef␟7816321715576490061: Once you complete this integration process you will be able to analyze your SBAC Assessment results within Otus. `,t=$localize`:analytics/sbacToolComponent|Description text to inform to user that Smarter balanced
18          assessment is valid and how it help students succeed␟8ea820978301b100c3df1b4ddb3efa40f2467845␟2856392187521705172: The Smarter Balanced assessment system is a valid, fair, and reliable approach to student assessment that provides educators, students and parents meaningful results with actionable data to help students succeed. The assessment system is aligned to the Common Core State Standards. `,o=$localize`:analytics/sbacToolComponent|Text to suggest user to download the SBAC CSV template␟d24a6580e79d39066b0737a1ee81f525f4b95ad5␟2001466679649592548: Download our SBAC CSV Template. `,n=$localize`:analytics/sbacToolComponent|Button to Download SBAC CSV Template file␟20aa3443728160b855640fc69e22b1c95d497a0f␟2276523459174523442:SBAC CSV Template (.csv)`,a=$localize`:analytics/sbacToolComponent|Text to suggest the user to click on the next arrow after have
19          files ready␟285d9761471866f7ce6dc0692058eb2ba3b20361␟1885050099497176621: Once you have your files ready, click the next arrow. `,c=$localize`:analytics/sbacToolComponent|Text to inform the user upload their files clicking on the
20          corresponding term upload buttons below␟1f08487adbddbfd35d7240ae833ccdfd8648c683␟1068337904738296704: Upload your files below by clicking on the corresponding term buttons: `,S=$localize`:analytics/sbacToolComponent|Text School Year to table column header␟92f577c7094efa7aba63f9124b91c975ba933327␟3199445472034065631: School Year `,I=$localize`:analytics/sbacToolComponent|Text CSV Files to table column header␟2a5f83f5376d7bce3463f19b68009380a63016b0␟1841786555140888800: CSV Files `,g=$localize`:analytics/sbacToolComponent|Button to upload CSV file␟ea9b1f235f6e0d3c0b6d40e254c3e187f281f50d␟6201334471102816878:${"\ufffd*6:1\ufffd\ufffd#1:1\ufffd"}:START_TAG_NG_CONTAINER:${"\ufffd#2:1\ufffd"}:START_TAG_OT_ICON:${"[\ufffd/#2:1\ufffd|\ufffd/#1:2\ufffd]"}:CLOSE_TAG_OT_ICON:${"\ufffd/#1:1\ufffd\ufffd/*6:1\ufffd"}:CLOSE_TAG_NG_CONTAINER:${"\ufffd*7:2\ufffd"}:START_TAG_NG_TEMPLATE:${"\ufffd#1:2\ufffd"}:START_TAG_OT_ICON_1:${"[\ufffd/#2:1\ufffd|\ufffd/#1:2\ufffd]"}:CLOSE_TAG_OT_ICON:${"\ufffd/*7:2\ufffd"}:CLOSE_TAG_NG_TEMPLATE:`,g=e.Zx4(g),B=$localize`:analytics/sbacToolComponent|Button to delete CSV file␟728ef70049f0c4faa519e5aa83a0931090d81aa2␟5890255946980521194:${"\ufffd#2\ufffd"}:START_TAG_OT_ICON:${"\ufffd/#2\ufffd"}:CLOSE_TAG_OT_ICON:`,z=$localize`:analytics/sbacToolComponent|Tooltip for button to upload CSV file␟0e157d455f7a06d3a001126ebad5a102aa449735␟3799666505689114697:Upload CSV file`,y=$localize`:analytics/sbacToolComponent|Tooltip for button to delete CSV file␟92c52d712b1b7abd3cdf3069d4b46eb45929eaf3␟2960759444388482747:Delete CSV file`,X=$localize`:analytics/sbacToolComponent|Description text to Congratulations the SBAC Assessment
21          integration␟260e02149520d5070555963d23306f459099d069␟8521771101398414133: Congratulations! `,U=$localize`:analytics/sbacToolComponent|Description text to inform that the user successfully
22          completed the SBAC Assessment integration␟9d0b72f3ec9128432737f4aeb7648f9fb97347e0␟9073852688922143900: You have successfully completed the SBAC Integration process. `,Ae=$localize`:analytics/sbacToolComponent|Text to suggest the user to visit the 3rd Part module␟f4e782cf53eb472b21b561856dd59694f8a5e378␟8877389575807452936: Visit the 3rd Party module to analyze and manage your SBAC data. `,[[1,"sbac-tool"],["class","sbac-tool__step-1",4,"ngIf"],["class","sbac-tool__step-2",4,"ngIf"],["class","sbac-tool__step-3",4,"ngIf"],["uploadMessage",""],["deleteFile",""],["class","sbac-tool__step-4",4,"ngIf"],[1,"sbac-tool__step-1"],[1,"row"],[1,"sbac-tool__description"],i,[1,"row","margin-top-15"],[1,"sbac-tool__icon"],["src","/assets/images/school-list/sbac.png"],[1,"row","margin-top-30"],t,[1,"sbac-tool__link","cursor-pointer","text-center","no-margin",3,"click"],[1,"sbac-tool__step-2"],[1,"sbac-tool__title","no-margin"],o,[1,"row","margin-top-80","ot-sbac-template-download-btn-row"],["ot-button","","size","large",3,"click"],["prefix","fas","icon","download"],n,[1,"row","margin-top-80"],a,[1,"sbac-tool__step-3"],c,["type","file","hidden","",1,"upload",3,"change"],["fileInput",""],[1,"row","margin-top-10"],["type","bright","maxHeight","22rem"],["width","40%"],S,I,["width","20%"],[4,"ngFor","ngForOf"],["ot-button","","color","transparent","trim","true","tooltipPosition","center-bottom",3,"ot-tooltip","disabled","click"],g,[4,"ngIf","ngIfElse"],["upload",""],["ot-button","","color","transparent","trim","true","tooltipPosition","center-bottom",3,"ot-tooltip","click",4,"ngIf"],["prefix","fas","name","file-excel"],["prefix","fas","name","upload"],["ot-button","","color","transparent","trim","true","tooltipPosition","center-bottom",3,"ot-tooltip","click"],B,["prefix","fas","name","trash-alt"],z,y,[1,"sbac-tool__step-4"],[1,"row","text-center"],["name","check-circle","aria-hidden","true",1,"success-icon"],[1,"row","margin-top-50"],[1,"sbac-tool__description","size-20","normal"],X,[1,"sbac-tool__description","size-20"],U,Ae]},template:function(t,o){1&t&&(e.TgZ(0,"div",0),e.YNc(1,so,13,0,"div",1),e.YNc(2,ao,11,0,"div",2),e.YNc(3,co,17,1,"div",3),e.YNc(4,mo,2,0,"ng-template",null,4,e.W1O),e.YNc(6,po,2,0,"ng-template",null,5,e.W1O),e.YNc(8,uo,11,0,"div",6),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",1==o.currentStep),e.xp6(1),e.Q6J("ngIf",2==o.currentStep),e.xp6(1),e.Q6J("ngIf",3==o.currentStep),e.xp6(
225),e.Q6J("ngIf",4==o.currentStep))},dependencies:[l.sg,l.O5,ee.J,me.g,be.u,ye._,ve.i],styles:["[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:not(:first-child){padding-block-start:0;padding-block-end:0}[_nghost-%COMP%]   ot-table[_ngcontent-%COMP%]   tbody[_ngcontent-%COMP%]   tr[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]:last-child{text-align:end}.sbac-tool__description[_ngcontent-%COMP%]{line-height:var(--ot-line-height-normal)}.ot-sbac-template-download-btn-row[_ngcontent-%COMP%]{text-align:center}"]}),s})();var h=r(10590),Te=(()=>{return(s=Te||(Te={}))[s.FALL=1]="FALL",s[s.WINTER=3]="WINTER",s[s.SPRING=2]="SPRING",Te;var s})();function To(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",13),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectModule(n.toolboxModuleEnum.NWEA))}),e._UZ(2,"img",14),e.qZA()()}if(2&s){const t=e.oxw(2);e.xp6(1),e.ekj("selected",t.isModuleSelected(t.toolboxModuleEnum.NWEA)),e.xp6(1),e.uIk("src",t.getToolImage(t.toolboxModuleEnum.NWEA),e.LSH)("alt",t.getAltImageText(t.toolboxModuleEnum.NWEA))}}function So(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",13),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectModule(n.toolboxModuleEnum.PARCC))}),e._UZ(2,"img",14),e.qZA()()}if(2&s){const t=e.oxw(2);e.xp6(1),e.ekj("selected",t.isModuleSelected(t.toolboxModuleEnum.PARCC)),e.xp6(1),e.uIk("src",t.getToolImage(t.toolboxModuleEnum.PARCC),e.LSH)("alt",t.getAltImageText(t.toolboxModuleEnum.PARCC))}}function Ao(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",13),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectModule(n.toolboxModuleEnum.AIMS_WEB))}),e._UZ(2,"img",14),e.qZA()()}if(2&s){const t=e.oxw(2);e.xp6(1),e.ekj("selected",t.isModuleSelected(t.toolboxModuleEnum.AIMS_WEB)),e.xp6(1),e.uIk("src",t.getToolImage(t.toolboxModuleEnum.AIMS_WEB),e.LSH)("alt",t.getAltImageText(t.toolboxModuleEnum.AIMS_WEB))}}function go(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",7)(1,"div",13),e.NdJ("click",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.selectModule(n.toolboxModuleEnum.SBAC))}),e._UZ(2,"img",14),e.qZA()()}if(2&s){const t=e.oxw(2);e.xp6(1),e.ekj("selected",t.isModuleSelected(t.toolboxModuleEnum.SBAC)),e.xp6(1),e.uIk("src",t.getToolImage(t.toolboxModuleEnum.SBAC),e.LSH)("alt",t.getAltImageText(t.toolboxModuleEnum.SBAC))}}function ho(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",6)(1,"div",7)(2,"div",8),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.addCompany())}),e._UZ(3,"ot-icon",9),e.TgZ(4,"div",10),e.SDv(5,11),e.qZA()()(),e.YNc(6,To,3,4,"div",12),e.YNc(7,So,3,4,"div",12),e.YNc(8,Ao,3,4,"div",12),e.YNc(9,go,3,4,"div",12),e.qZA()}if(2&s){const t=e.oxw();e.xp6(2),e.ekj("selected",t.isModuleSelected(t.toolboxModuleEnum.OCA)),e.xp6(4),e.Q6J("ngIf",t.canAddTool(t.toolboxModuleEnum.NWEA)),e.xp6(1),e.Q6J("ngIf",t.canAddTool(t.toolboxModuleEnum.PARCC)),e.xp6(1),e.Q6J("ngIf",t.canAddTool(t.toolboxModuleEnum.AIMS_WEB)),e.xp6(1),e.Q6J("ngIf",t.canAddTool(t.toolboxModuleEnum.SBAC))}}
22function Co(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"ot-nwea-tool",15),e.NdJ("onUpdate",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.hasUpdated())}),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("currentStep",t.currentStep)("nweaLastSyncDate",t.nweaLastSyncDate)("termIdsYear",t.termIdsYear)}}function Oo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"ot-parcc-tool",16),e.NdJ("onUpdate",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.hasUpdated())}),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("currentStep",t.currentStep)}}function fo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"ot-aimsweb-tool",16),e.NdJ("onUpdate",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.hasUpdated())}),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("currentStep",t.currentStep)}}function Eo(s,i){if(1&s&&e._UZ(0,"ot-khan-tool",17),2&s){const t=e.oxw();e.Q6J("currentStep",t.currentStep)}}function Mo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"ot-sbac-tool",18),e.NdJ("newDataUploaded",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.selectNewSchoolYear.emit(n))}),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("currentStep",t.currentStep)}}let Ve=(()=>{class s{constructor(t,o){this._ocaService=t,this._toolboxService=o,this.onCloseModal=new e.vpe,this.selectNewSchoolYear=new e.vpe,this.onAddTool=new e.vpe,this.onAddCompany=new e.vpe,this._defaultTitle=$localize`:analytics/addToolboxResourceModalComponent|Text to default page title:Select a 3rd Party Resource`,this.title=this._defaultTitle,this.toolboxModuleEnum=h.G,this._toolboxModuleSelected=h.G.NONE,this.totalSteps=1,this.currentStep=0,this._minStep=0,this._hasUpdated=!1,this.canShowNextStep=()=>{let n=!0;switch(this._toolboxModuleSelected){case h.G.NWEA:n=this._nweaComponent.canShowNextStep();break;case h.G.AIMS_WEB:n=this._aimswebToolComponent.canShowNextStep();break;case h.G.PARCC:n=this._parccToolComponent.canShowNextStep();break;case h.G.SBAC:n=this._sbacToolComponent.canShowNextStep();break;default:n=!0}return n}}ngOnInit(){this.lastNweaSync()}lastNweaSync(){this._toolboxService.getLastNweaSync().subscribe(t=>{t?.syncDate&&(this.nweaLastSyncDate=t.syncDate,this.termsLastSynced())})}termsLastSynced(){this._toolboxService.getNweaTermsLastSynced().subscribe(t=>{t?.success&&(this.termIdsYear=t.data,this.termIdsYear=this.termIdsYear.map(o=>(Number(o.term_id)===Te.FALL?o.term_id="Fall":Number(o.term_id)===Te.WINTER?o.term_id="Winter":Number(o.term_id)===Te.SPRING&&(o.term_id="Spring"),o)))})}showModal(t=h.G.NONE,o=0){this.selectModule(t),this.onChangeStep({step:o,direction:Be.L.Forward}),this._minStep=o,this._modalComponent.showModal()}closeModal(){this.onCloseModal.emit(this._toolboxModuleSelected),this._hasUpdated&&(this.onAddTool.emit(this._toolboxModuleSelected),this._hasUpdated=!1)}onClickCloseModal(){this._modalComponent.closeModal()}addCompany(){this.onAddCompany.emit(),this._modalComponent.closeModal()}selectModule(t){if(this._toolboxModuleSelected!==t)switch(this.currentStep=0,this._toolboxModuleSelected=t,t){case h.G.NWEA:this.totalSteps=5;break;case h.G.AIMS_WEB:case h.G.PARCC:case h.G.SBAC:this.totalSteps=4;break;default:this.totalSteps=0}}canAddTool(t){return-1==(0,rt.Z)(this._currentTools,t)}isModuleSelected(t){return this._toolboxModuleSelected==t}isArrowsEnabled(){return this._toolboxModuleSelected!==h.G.NONE}onChangeStep(t){if(this.currentStep=t.step,this.currentStep>=1)switch(this._toolboxModuleSelected){case h.G.NWEA:this.title=$localize`:analytics/addToolboxResourceModalComponent|Text NWEA Integration to modal title:NWEA Integration`;break;case h.G.AIMS_WEB:this.title=$localize`:analytics/addToolboxResourceModalComponent|Text Aimsweb Integration to modal title:Aimsweb Integration`;break;case h.G.PARCC:this.title=$localize`:analytics/addToolboxResourceModalComponent|Text PARCC Integration to modal title:PARCC Integration`;break;case h.G.SBAC:this.title=$localize`:analytics/addToolboxResourceModalComponent|Text SBAC Integration to modal title:SBAC Integration`;break;default:this.title=this._defaultTitle}else this.title=this._defaultTitle}onSaveLtiTool(){this.currentStep++,this._hasUpdated=!0}onAddLTITool(){this.currentStep--}
22onOCAFinishStep(){this.currentStep++}onOCABackStep(t){this.currentStep=this.currentStep-t}hasUpdated(){this._hasUpdated=!0}getToolImage(t){return this._toolboxService.getToolImage(t)}getAltImageText(t){return this._toolboxService.getAltImageText(t)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Ze.c),e.Y36(Y.l))},s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-add-toolbox-resource-modal"]],viewQuery:function(t,o){if(1&t&&(e.Gf(Be.k,5),e.Gf(ze,5),e.Gf(He,5),e.Gf(We,5),e.Gf(Je,5),e.Gf(Qe,5)),2&t){let n;e.iGM(n=e.CRH())&&(o._modalComponent=n.first),e.iGM(n=e.CRH())&&(o._aimswebToolComponent=n.first),e.iGM(n=e.CRH())&&(o._khanToolComponent=n.first),e.iGM(n=e.CRH())&&(o._nweaComponent=n.first),e.iGM(n=e.CRH())&&(o._parccToolComponent=n.first),e.iGM(n=e.CRH())&&(o._sbacToolComponent=n.first)}},inputs:{_currentTools:["currentTools","_currentTools"]},outputs:{onCloseModal:"onCloseModal",selectNewSchoolYear:"selectNewSchoolYear",onAddTool:"onAddTool",onAddCompany:"onAddCompany"},decls:7,vars:15,consts:function(){let i;return i=$localize`:analytics/addToolboxResourceModalComponent|Text Add Other Company to button label␟0439f7295b8d307044f0f45b196099edd1a6b1f6␟5806891911393788772: Add Other Company `,[["size","large",3,"title","totalSteps","currentStep","minStep","enableArrows","closeAtLastStep","canShowNextStep","lockModal","zIndexOverride","onChangeStep","onCloseModal"],["class","row small-up-3 medium-up-3 large-up-3 toolbox-resource-modal__wrapper",4,"ngIf"],[3,"currentStep","nweaLastSyncDate","termIdsYear","onUpdate",4,"ngIf"],[3,"currentStep","onUpdate",4,"ngIf"],[3,"currentStep",4,"ngIf"],[3,"currentStep","newDataUploaded",4,"ngIf"],[1,"row","small-up-3","medium-up-3","large-up-3","toolbox-resource-modal__wrapper"],[1,"column","column-block"],[1,"add-toolbox-resource-modal__resource_tile","add-company-tile",3,"click"],["name","plus-circle",1,"new-company-icon"],[1,"add-company-text"],i,["class","column column-block",4,"ngIf"],[1,"add-toolbox-resource-modal__resource_tile",3,"click"],[1,""],[3,"currentStep","nweaLastSyncDate","termIdsYear","onUpdate"],[3,"currentStep","onUpdate"],[3,"currentStep"],[3,"currentStep","newDataUploaded"]]},template:function(t,o){1&t&&(e.TgZ(0,"ot-steps-modal",0),e.NdJ("onChangeStep",function(a){return o.onChangeStep(a)})("onCloseModal",function(){return o.onClickCloseModal()}),e.YNc(1,ho,10,6,"div",1),e.YNc(2,Co,1,3,"ot-nwea-tool",2),e.YNc(3,Oo,1,1,"ot-parcc-tool",3),e.YNc(4,fo,1,1,"ot-aimsweb-tool",3),e.YNc(5,Eo,1,1,"ot-khan-tool",4),e.YNc(6,Mo,1,1,"ot-sbac-tool",5),e.qZA()),2&t&&(e.Q6J("title",o.title)("totalSteps",o.totalSteps)("currentStep",o.currentStep)("minStep",o._minStep)("enableArrows",o.isArrowsEnabled())("closeAtLastStep",!0)("canShowNextStep",o.canShowNextStep)("lockModal",!0)("zIndexOverride",9998),e.xp6(1),e.Q6J("ngIf",0==o.currentStep),e.xp6(1),e.Q6J("ngIf",o.isModuleSelected(o.toolboxModuleEnum.NWEA)),e.xp6(1),e.Q6J("ngIf",o.isModuleSelected(o.toolboxModuleEnum.PARCC)),e.xp6(1),e.Q6J("ngIf",o.isModuleSelected(o.toolboxModuleEnum.AIMS_WEB)),e.xp6(1),e.Q6J("ngIf",o.isModuleSelected(o.toolboxModuleEnum.KHAN)),e.xp6(1),e.Q6J("ngIf",o.isModuleSelected(o.toolboxModuleEnum.SBAC)))},dependencies:[Be.k,ee.J,l.O5,Qe,ze,He,We,Je],encapsulation:2}),s})();var Se=r(81854),No=r(37415),Oe=r(26378),we=r(30378),Le=r(19509),Po=r(75628);function bo(s,i){1&s&&(e.TgZ(0,"span",22),e.SDv(1,23),e.qZA())}function yo(s,i){if(1&s&&(e.TgZ(0,"span",24),e._uU(1),e.qZA()),2&s){const t=e.oxw();e.xp6(1),e.Oqu(null==t.company?null:t.company.name)}}function vo(s,i){if(1&s&&e._UZ(0,"img",25),2&s){const t=e.oxw();e.Q6J("src",null==t.company?null:t.company.thumbnailPreview,e.LSH)}}function xo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",26),e.NdJ("mouseenter",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.showLogoRemove())})("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.removeCompanyPhoto())}),e.TgZ(1,"p"),e.SDv(2,27),e.qZA()()}if(2&s){const t=e.oxw();e.Udp("visibility",t.shouldShowRemoveLogo?"visible":"hidden")}}function wo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"otus-input",28),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.company.name=n)}),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("ngModel",t.company.name)("required",!0)("width",300)("showCharsCount",!0)("maxlength",60)}}
22function Lo(s,i){if(1&s&&(e.TgZ(0,"p",29),e._uU(1),e.ALo(2,"truncateText"),e.qZA()),2&s){const t=e.oxw();e.xp6(1),e.hij(" ",e.xi3(2,1,null==t.company?null:t.company.filename,30)," ")}}let Ke=(()=>{class s{constructor(t,o,n,a,c){this._ocaService=t,this._alertMessageService=o,this._confirmAlertManager=n,this._otherAssessmentService=a,this._userSessionService=c,this.onAddNewCompany=new e.vpe,this.onEditCompany=new e.vpe,this.fileName="",this.newCompanyName="",this.isEditing=!1,this.shouldShowRemoveLogo=!1}showModal(t){this.isEditing=!1,t?.id?(this.isEditing=!0,this.company=t,this.clonedCompany=(0,p.Z)(t),this.companyId=t.id):(this.company=new we.S,this.clonedCompany=new we.S),this.newModalComponent.showModal()}canSubmitCompany(){var t;if(this.company&&this.clonedCompany&&null!==(t=this.company)&&void 0!==t&&t.name){if(null==this.company.thumbnailPreview&&null!==this.clonedCompany.thumbnailPreview)return!0;if(null!==this.company.thumbnailPreview&&this.company.thumbnailPreview!==this.clonedCompany.thumbnailPreview&&this.company.name.length>0)return!0;if(this.company.name.length>0&&this.company.name!==this.clonedCompany.name)return!0}return!1}onSubmit(){this.userId=this._userSessionService.getUserId(),this.companyId?this.companyId&&this._editCompany():this._saveNewCompany()}_saveNewCompany(){this._otherAssessmentService.createCompany(this.company.name,this.userId).subscribe(t=>{t?.success?(this.company.id=t.company.insertId,this.company.createdByUserId=this.userId,this.newCompanyName=t.company.companyName,this.company.attachmentFile&&this.company.thumbnailPreview?this._updateCompanyLogo():this._emitCompany(),this._alertMessageService.success($localize`:analytics/addCompanyModalComponent|Successfully added message:Company successfully added.`),this.newModalComponent.closeModal()):this._alertMessageService.error($localize`:analytics/addCompanyModalComponent|Error message to inform that is unable to add new company:Unable to add new company at this time.`)})}_editCompany(){this.company.modifiedByUserId=this.userId,this._otherAssessmentService.editCompany(this.companyId,this.company.name).subscribe(t=>{if(t&&t.affectedRows>0){const n=this.company.thumbnailPreview&&this.company.attachmentFile&&this.company.thumbnailPreview!==this.clonedCompany.thumbnailPreview;this.newCompanyName=this.company.name,n?this._updateCompanyLogo():this._emitCompany(),this._alertMessageService.success($localize`:analytics/addCompanyModalComponent|Successfully edited message:Company successfully edited.`),this.newModalComponent.closeModal()}else this._alertMessageService.error($localize`:analytics/addCompanyModalComponent|Error message to inform that is unable to edit company:Unable to edit company at this time.`)})}_updateCompanyLogo(){this._otherAssessmentService.addCompanyLogo(this.company.id,this.company.attachmentFile).then(t=>{const o=t&&t>0?t:null;o&&o>0?this._associateLogoIdWithCompany(o):(this._alertMessageService.error($localize`:analytics/addCompanyModalComponent|Error message to inform that is unable to add logo:Unable to add logo at this time.`),this._emitCompany())}).catch(t=>console.error(t))}_associateLogoIdWithCompany(t){this._otherAssessmentService.associateLogoIdWithCompany(this.company.id,t).subscribe(o=>{o?.success?this._emitCompany(t):this._alertMessageService.error($localize`:analytics/addCompanyModalComponent|Error message to inform that is unable to add logo:Unable to add logo at this time.`)})}_emitCompany(t){const o=new we.S;o.name=this.newCompanyName,o.attachmentFile=this.company.attachmentFile,o.createdByUserId=this.company.createdByUserId,o.id=this.company.id,o.thumbnailPreview=this.company.thumbnailPreview,o.thumbnailId=t,this.isEditing?this.onEditCompany.emit(o):this.onAddNewCompany.emit(o)}clearForm(){this.companyId=null,this.company.name=""}uploadImage(t){this.company.filename=t.name;const o=new FileReader;o.onload=n=>{this.company.thumbnailPreview=n.target.result,this.company.attachmentFile=t},o.readAsDataURL(t)}showLogoRemove(){this.shouldShowRemoveLogo=!0}hideLogoRemove(){this.shouldShowRemoveLogo=!1}removeCompanyPhoto(){this._otherAssessmentService.getThumbnailId(this.companyId).subscribe(n=>{this.updatedThumbnailId=n[0].thumbnail_id});const t=this.companyId;this._confirmAlertManager.showYesOrNoDialog($localize`:analytics/addCompanyModalComponent|First part of remove company question:Are you sure you want to remove `+this.company.name+$localize`:analytics/addCompanyModalComponent|Second part of remove company question:'s Logo?`,()=>{null==this.updatedThumbnailId?this.company.thumbnailPreview=null:this._otherAssessmentService.deleteCompanyLogo(t,this.updatedThumbnailId).subscribe(n=>{n?.success?(this.company.thumbnailPreview=null,this.company.thumbnailId=null,this._alertMessageService.success($localize`:analytics/addCompanyModalComponent|Successfully deleted message:Company Logo successfully deleted.`)):this._alertMessageService.error($localize`:analytics/addCompanyModalComponent|Error message to inform that is unable to delete logo:Unable to delete company logo at this time.`)})})}allowedTypes(){return No.k4}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Ze.c),e.Y36(f.Of),e.Y36(Le.Q),e.Y36(Oe.z),e.Y36(F.o))},s.\u0275cmp=e.Xpm({type:s,selectors:[["add-company-modal"]],viewQuery:function(t,o){if(1&t&&e.Gf(Se.P,5),2&t){let n;e.iGM(n=e.CRH())&&(o.newModalComponent=n.first)}},outputs:{onAddNewCompany:"onAddNewCompany",onEditCompany:"onEditCompany"},decls:23,vars:7,consts:function(){let i,t,o,n,a,c,S,I;return i=$localize`:analytics/addCompanyModalComponent|Text Company Name to input placeholder␟9c9bcce26b88c479230f6dee895623acd0a4b362␟6048889082702765852:Company Name`,t=$localize`:analytics/addCompanyModalComponent|Text Company Name to input label␟9c9bcce26b88c479230f6dee895623acd0a4b362␟6048889082702765852:Company Name`,o=$localize`:analytics/addCompanyModalComponent|Text to Company Logo label␟97578cc0cb57aeda678995d645f71972c956dc7d␟8544569436870801005:Company Logo (Optional)`,n=$localize`:analytics/addCompanyModalComponent|Text to Choose file button␟e5d9b82ca64e5362dbebc328564a418ee59f7e00␟1821316420931721980: Choose file `,a=$localize`:analytics/addCompanyModalComponent|Text to inform which types of images are accepted␟994072433637be24c6fdacbd0cf153f1380b924c␟1670423793193743785: Images must be .png or .jpg. `,c=$localize`:analytics/addCompanyModalComponent|Save button␟0fe997a5bc7b69ea36a84e5ae332247cda97d331␟56600559798734203:Save`,S=$localize`:analytics/addCompanyModalComponent|Text New Company Tile to modal title␟cb72eb22a9fd2060b0d1e8e17c8fd864b0f95753␟5760727212163903726:New Company Tile`,I=$localize`:analytics/addCompanyModalComponent|Remove Company Logo button␟2d8b23f336f3f99173760411a833978e00564512␟3974021977663447228: Remove Company Logo `,[[3,"onCloseModal"],[1,"add-company-container"],[1,"add-company-container__logo",3,"mouseenter","mouseleave"],["class","add-company-container__logo__empty-tile",4,"ngIf"],["class","add-company-container__logo__company-name",4,"ngIf"],["class","thumbnail-image",3,"src",4,"ngIf"],["class","attachment-delete-button",3,"visibility","mouseenter","click",4,"ngIf"],[1,"add-company-container__input-wrapper"],[1,"add-company-container__input-wrapper__company-name"],["placeholder",i,"label",t,3,"ngModel","required","width","showCharsCount","maxlength","ngModelChange",4,"ngIf"],[1,"add-company-container__input-wrapper__logo-upload"],[1,"add-company-container__input-wrapper__logo-upload__label"],o,[1,"file-upload-container"],["containerClass","add-company-logo-button","fileId","fileField","noLabel","true","sizeInMega","30","typesAllowedToken","IMAGES",3,"onSelect"],[1,"logo-upload-button-container"],n,["id","file-name",4,"ngIf"],[1,"add-company-container__input-wrapper__logo-upload__instructions"],a,[1,"add-company-container__input-wrapper__submit"],["buttonText",c,3,"inactive","onClick"],[1,"add-company-container__logo__empty-tile"],S,[1,"add-company-container__logo__company-name"],[1,"thumbnail-image",3,"src"],[1,"attachment-delete-button",3,"mouseenter","click"],I,["placeholder",i,"label",t,3,"ngModel","required","width","showCharsCount","maxlength","ngModelChange"],["id","file-name"]]},template:function(t,o){1&t&&(e.TgZ(0,"ot-new-modal",0),e.NdJ("onCloseModal",function(){return o.clearForm()}),e.TgZ(1,"div",1)(2,"div",2),e.NdJ("mouseenter",function(){return o.showLogoRemove()})("mouseleave",function(){return o.hideLogoRemove()}),e.YNc(3,bo,2,0,"span",3),e.YNc(4,yo,2,1,"span",4),e.YNc(5,vo,1,1,"img",5),e.YNc(6,xo,3,2,"button",6),e.qZA(),e.TgZ(7,"div",7)(8,"div",8),e.YNc(9,wo,1,5,"otus-input",9),e.qZA(),e.TgZ(10,"div",10)(11,"label",11),e.SDv(12,12),e.qZA(),e.TgZ(13,"div",13)(14,"ot-file-upload",14),e.NdJ("onSelect",function(a){return o.uploadImage(a)}),e.TgZ(15,"div",15)(16,"p"),e.SDv(17,16),e.qZA()()(),e.YNc(18,Lo,3,4,"p",17),e.qZA(),e.TgZ(19,"div",18),e.SDv(20,19),e.qZA()(),e.TgZ(21,"div",20)(22,"otus-button",21),e.NdJ("onClick",function(){return o.onSubmit()}),e.qZA()()()()()),2&t&&(e.xp6(3),e.Q6J("ngIf",!(null!=o.company&&o.company.name||null!=o.company&&o.company.thumbnailPreview)),e.xp6(1),e.Q6J("ngIf",(null==o.company?null:o.company.name)&&!(null!=o.company&&o.company.thumbnailPreview)),e.xp6(1),e.Q6J("ngIf",null==o.company?null:o.company.thumbnailPreview),e.xp6(1),e.Q6J("ngIf",null==o.company?null:o.company.thumbnailPreview),e.xp6(3),e.Q6J("ngIf",o.company),e.xp6(9),e.Q6J("ngIf",null==o.company?null:o.company.thumbnailPreview),e.xp6(4),e.Q6J("inactive",!o.canSubmitCompany()))},dependencies:[N.JJ,N.Q7,N.nD,N.On,Se.P,ie.A,j.d,Me.Y,l.O5,Po.q],encapsulation:2}),s})();var qe=r(65079),je=r(71826),et=r(73900),Ro=r(77579),Io=r(82722),Do=r(69751),Uo=r(54004),$o=r(18505),Fo=r(10425),Bo=r(88356);let Zo=(()=>{class s{constructor(t){this.napiService=t,this.companyLogos={}}getCompanyLogo(t,o){if(this.companyLogos&&t in this.companyLogos)return new Do.y(a=>{a.next(this.companyLogos[t]),a.complete()});const n={};return o&&(n.districtId=o),this.napiService.doGet(`/analytics/companies/company-logo/${t}`,n,!1).pipe((0,Uo.U)(a=>{var c;return a?.Body&&a.Body.data?`data:image/jpeg;base64,${(0,Bo.sM)(null===(c=a.Body)||void 0===c?void 0:c.data)}`:a?.url?a.url:""}),(0,$o.b)(a=>{this.companyLogos[t]=a}))}}return s.\u0275fac=function(t){return new(t||s)(e.LFG(Fo.b))},s.\u0275prov=e.Yz7({token:s,factory:s.\u0275fac,providedIn:"root"}),s})();
22function Yo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"img",2),e.NdJ("error",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.thumbnailPreview=null)}),e.qZA()}if(2&s){const t=e.oxw();e.Q6J("src",t.thumbnailPreview,e.LSH)}}function Go(s,i){if(1&s&&(e.TgZ(0,"span",3),e._uU(1),e.qZA()),2&s){const t=e.oxw();e.ekj("default-text",t.company.name.length<=40)("small-text",t.company.name.length>40),e.xp6(1),e.Oqu(t.company.name)}}let ko=(()=>{class s{constructor(t,o){this.thumbnailService=t,this.userSessionService=o,this.onDestroy$=new Ro.x,this.isConsortiumAdmin=!1}ngOnInit(){var t,o;const n=null===(t=this.company)||void 0===t?void 0:t.otherCompany;if(!n?.thumbnailId&&!n?.thumbnailPreview)return;const a=this.userSessionService.getUAAUserAuthority();let c;this.isConsortiumAdmin=!!a&&a.hasRole("ROLE_CONSORTIUM_ADMIN"),this.isConsortiumAdmin&&(c=null===(o=this.userSessionService.getSelectedDistrict())||void 0===o?void 0:o.id),this.thumbnailService.getCompanyLogo(this.company.otherCompany.id,c).pipe((0,Io.R)(this.onDestroy$)).subscribe(S=>{this.thumbnailPreview=S})}ngOnDestroy(){this.onDestroy$.next(null),this.onDestroy$.complete()}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Zo),e.Y36(F.o))},s.\u0275cmp=e.Xpm({type:s,selectors:[["otus-other-company-thumbnail"]],inputs:{company:"company"},decls:2,vars:2,consts:[["class","other-thumbnail-tool",3,"src","error",4,"ngIf"],["class","new-tool",3,"default-text","small-text",4,"ngIf"],[1,"other-thumbnail-tool",3,"src","error"],[1,"new-tool"]],template:function(t,o){1&t&&(e.YNc(0,Yo,1,1,"img",0),e.YNc(1,Go,2,5,"span",1)),2&t&&(e.Q6J("ngIf",o.thumbnailPreview),e.xp6(1),e.Q6J("ngIf",!o.thumbnailPreview))},dependencies:[l.O5],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.other-thumbnail-tool[_ngcontent-%COMP%]{max-width:6.875rem;max-height:6.875rem}"]}),s})();function Xo(s,i){1&s&&(e.ynx(0),e._UZ(1,"ot-icon",13),e.TgZ(2,"div",14),e.SDv(3,15),e.qZA(),e.BQk())}const zo=function(s){return{thumbnailComponent:s}};function Ho(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"button",19),e.NdJ("click",function(n){e.CHM(t);const a=e.oxw(2).$implicit;return e.oxw().onClickManageCompany(a),e.KtG(n.stopPropagation())}),e._UZ(1,"ot-icon-label",20),e.qZA()}if(2&s){e.oxw();const t=e.MAs(3);e.oxw(2);const o=e.MAs(9);e.Q6J("trim",!0)("ot-menu-trigger",o)("menuTemplateContext",e.VKq(3,zo,t))}}function Wo(s,i){if(1&s&&(e.ynx(0),e.YNc(1,Ho,2,5,"button",16),e._UZ(2,"otus-other-company-thumbnail",17,18),e.BQk()),2&s){const t=e.oxw().$implicit,o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.hasPermissionToEdit(t.otherCompany)),e.xp6(1),e.Q6J("company",t)}}function Jo(s,i){if(1&s){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",21),e.NdJ("click",function(n){e.CHM(t);const a=e.oxw().$implicit;return e.oxw().onManageTool(a.type),e.KtG(n.stopPropagation())}),e._UZ(2,"ot-icon-label",20),e.qZA(),e._UZ(3,"img",22),e.BQk()}if(2&s){const t=e.oxw().$implicit,o=e.oxw(),n=e.MAs(9);e.xp6(1),e.Q6J("trim",!0)("ot-menu-trigger",n),e.xp6(2),e.uIk("src",o.getToolImage(t.type),e.LSH)("alt",o.getAltImageText(t.type))}}function Qo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",9),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw();return e.KtG(a.type===c.ToolboxModuleEnum.OTHER?c.onSelectOtherCompany(a):c.setMyToolbox(a.type))}),e.TgZ(1,"div",10),e.YNc(2,Xo,4,0,"ng-container",11),e.YNc(3,Wo,4,2,"ng-container",11),e.YNc(4,Jo,4,4,"ng-container",12),e.qZA()()}if(2&s){const t=i.$implicit,o=i.index,n=e.oxw();e.ekj("end",o===n.sortedCompanies.length-1),e.xp6(1),e.ekj("tool-selected",n.isCurrentAnalytics(t.type)&&(t.type!==n.ToolboxModuleEnum.OTHER||t.selected))("add-new",-1===t.type),e.Q6J("ngSwitch",t.type),e.xp6(1),e.Q6J("ngSwitchCase",n.ToolboxModuleEnum.NONE),e.xp6(1),e.Q6J("ngSwitchCase",n.ToolboxModuleEnum.OTHER)}}function Vo(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"li",23),e.NdJ("click",function(){const a=e.CHM(t).$implicit;e.oxw();const c=e.MAs(9);return a.callback(null==c?null:c.menuTemplateContext),e.KtG(c.hide())}),e.ynx(1,24),e._UZ(2,"ot-icon",25),e.BQk(),e.ynx(3,26),e._uU(4),e.BQk(),e.qZA()}if(2&s){const t=i.$implicit;e.xp6(2),e.Q6J("name",t.icon),e.xp6(2),e.Oqu(t.label)}}let Ko=(()=>{class s{constructor(t,o,n,a,c,S,I,g,B,z,y){this._toolboxService=t,this._apiService=o,this._router=n,this._otherAssessmentService=a,this._alertMessageService=c,this._confirmAlertManager=S,this._userSessionService=I,this._selectConsortiumDistrictService=g,this._toggleService=B,this._thirdOtherAssessmentService=z,this.otusInsightsService=y,this.subHelper=new re.lZ,this.menuOptions=[],this.ToolboxModuleEnum=h.G,this._tools=[h.G.
22NONE,h.G.OTHER],this.hasOtherCompanyData=!1,this.selectedCompanyName="",this.isEditingOCA=!1,this.isOtherCompanyPage=!1,this.isConsortiumAdmin=!1}ngOnInit(){window.scrollTo(0,0),this.isOtherCompanyPage=-1!==this._router.url.indexOf("other-assessment"),this.userId=this._userSessionService.getUserId();const t=this._userSessionService.getUAAUserAuthority();this.isConsortiumAdmin=!!t&&t.hasRole("ROLE_CONSORTIUM_ADMIN"),this.updateInsightsContext(),this.isConsortiumAdmin?this.subHelper.addSubscription(this._selectConsortiumDistrictService.districtId$.subscribe(o=>{var n;this._analyticsPosition=h.G.NONE;const a=null===(n=this._userSessionService.getSelectedDistrict())||void 0===n?void 0:n.id;Number(a)!==o&&this._toolboxService.resetAnalytics3rdParty(),this.getAnalytics3rdParty(o)})):this.getAnalytics3rdParty()}ngOnDestroy(){this.subHelper.disposeAll()}onAddTool(){this.getAnalytics3rdParty()}addCompany(){this._addCompanyModalComponent.showModal(),this.isEditingOCA=!1}onAddNewCompany(t){const o={id:t.id,type:h.G.OTHER,name:t.name,createdByUserId:t.createdByUserId,selected:!1,otherCompany:t,thumbnailId:t.thumbnailId};this.otherCompanies&&0==this.otherCompanies.length&&(this.otherCompanies=[],this.otherCompanies.push(o)),this.addNewCompanyToMainList(o)}addNewCompanyToMainList(t){const o=(0,p.Z)(this.sortedCompanies);o.push(t),this.reloadCompaniesArray(o)}onEditCompany(t){const o=this.sortedCompanies.find(function(n){return n.otherCompany&&n.otherCompany.id==t.id});o.name=t.name,""==o.name&&(o.name=this.selectedCompanyName),o.thumbnailPreview=t.thumbnailPreview,this.reloadCompaniesArray()}reloadCompaniesArray(t){let o=t;o||(o=(0,p.Z)(this.sortedCompanies));const n=(0,P.Z)(o,a=>-1==a.type);null!==n&&o.splice(n,1),this.sortedCompanies=this._sortAssessments(o)}getAnalytics3rdParty(t){var o;this.isConsortiumAdmin&&!t&&(t=null===(o=this._userSessionService.getSelectedDistrict())||void 0===o?void 0:o.id),this._toolboxService.getAnalytics3rdParty(t).subscribe(n=>{if(n?.success){const a=this.jsonToTools(n.success),c=this._getOrderedTools(a),S=this._prepareAssessmentObjects(c);if(this._tools=c,this.hasOtherCompanyData=n.success.hasOtherCompaniesData,this.hasOtherCompanyData){this.otherCompanies=(0,d.Deserialize)(n.success.otherCompaniesLogo,we.S);const I=(0,p.Z)(this.otherCompanies);for(const g of I){const B={};B.type=h.G.OTHER,B.name=g.name,B.otherCompany=g,S.push(B)}}this.sortedCompanies=this._sortAssessments(S);for(const I of this.sortedCompanies)I.selected=!1}})}_getOrderedTools(t){const o=[],n=[1,4,3,8,0,2,6,9];for(let a=0;a<n.length;a++)t.indexOf(n[a])>-1&&o.push(n[a]);return o}_prepareAssessmentObjects(t){const o=[];for(const n of t){const a={};a.type=n,a.name=h.G[n],o.push(a)}return o}_sortAssessments(t){let o=t||this.sortedCompanies;return o=o.sort(function(n,a){return n.name.toLowerCase()>a.name.toLowerCase()?1:a.name.toLowerCase()>n.name.toLowerCase()?-1:0}),o.push({type:-1,name:"NONE",selected:!1}),o}onManageTool(t){this.menuOptions={[h.G.OCA]:[{label:$localize`:analytics/analyticsToolboxComponent|Text CSV Template to toolbox item label:CSV Template`,callback:()=>this._onDownloadOCACSVTemplate(),icon:"download"},{label:$localize`:analytics/analyticsToolboxComponent|Text Assessment to toolbox item label:Assessment`,callback:()=>this._onAddOCA(),icon:"plus"},{label:$localize`:analytics/analyticsToolboxComponent|Text Edit to toolbox item label:Edit`,callback:()=>this._onEditOCA(),icon:"pencil-alt"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to toolbox item label:Help`,callback:()=>this._onOCAHelp(),icon:"question"}],[h.G.PARCC]:[{label:$localize`:analytics/analyticsToolboxComponent|Text PARCC CSV Template to toolbox item label:PARCC CSV Template`,callback:()=>this._onDownloadPARCCCSVTemplate(),icon:"download"},{label:$localize`:analytics/analyticsToolboxComponent|Text Manage Uploads to toolbox item label:Manage Uploads`,callback:()=>this._onManagePARCCTools(),icon:"cogs"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to toolbox item label:Help`,callback:()=>this._onPARCCHelp(),icon:"question"}],[h.G.KHAN]:[{label:$localize`:analytics/analyticsToolboxComponent|Text Khan Academy Website to toolbox item label:Khan Academy Website`,callback:()=>this._onKhanWebSite(),icon:"window-maximize"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to toolbox item label:Help`,callback:()=>this._onKhanHelp(),icon:"question"}],[h.G.NWEA]:[{label:$localize`:analytics/analyticsToolboxComponent|Text NWEA CSV Template to toolbox item label:NWEA CSV Template`,callback:()=>this._onDownloadNweaCSVTemplate(),icon:"download"},{label:$localize`:analytics/analyticsToolboxComponent|Text Manage Uploads to toolbox item label:Manage Uploads`,callback:()=>this._onManageNweaTools(),icon:"cogs"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to toolbox item label:Help`,callback:()=>this._onNweaHelp(),icon:"question"}],[h.G.AIMS_WEB]:[{label:$localize`:analytics/analyticsToolboxComponent|Text aimsweb CSV Template to toolbox item label:aimsweb CSV Template`,callback:()=>this._onDownloadAimswebCSVTemplate(),icon:"download"},{label:$localize`:analytics/analyticsToolboxComponent|Text Manage Uploads to toolbox item label:Manage Uploads`,callback:()=>this._onManageAimswebTools(),icon:"cogs"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to toolbox item label:Help`,callback:()=>this._onAimswebHelp(),icon:"question"}],[h.G.SBAC]:[{label:$localize`:analytics/analyticsToolboxComponent|Text SBAC CSV Template to toolbox item label:SBAC CSV Template`,callback:()=>this._onDownloadSBACCSVTemplate(),icon:"download"},{label:$localize`:analytics/analyticsToolboxComponent|Text Manage Uploads to toolbox item label:Manage Uploads`,callback:()=>this._onManageSBACTools(),icon:"cogs"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to toolbox item label:Help`,callback:()=>this._onSBACHelp(),icon:"question"}]}[t]}onClickManageCompany(t){this.selectedCompany=t.otherCompany,this.otherCompany=t,this.selectedCompanyName=t.name,this.menuOptions=[{label:$localize`:analytics/analyticsToolboxComponent|Text Download CSV to menu option label:Download CSV`,callback:()=>this._onDownloadOCACSVTemplate(),icon:"download"},{label:$localize`:analytics/analyticsToolboxComponent|Text Manage Data to menu option label:Manage Data`,callback:()=>this.manageData(),icon:"cog"},{label:$localize`:analytics/analyticsToolboxComponent|Text Edit Company Info to menu option label:Edit Company Info`,callback:o=>{this.selectedCompany&&o?.thumbnailComponent&&(this.selectedCompany.thumbnailPreview=o.thumbnailComponent.thumbnailPreview),this.editCompany()},icon:"pencil-alt"},{label:$localize`:analytics/analyticsToolboxComponent|Text Help to menu option label:Help`,callback:()=>this._onOCAHelp(),icon:"question"},{label:$localize`:analytics/analyticsToolboxComponent|Text Delete to menu option label:Delete`,callback:()=>this.deleteCompany(),icon:"trash"}]}manageData(){localStorage.setItem(this._otherAssessmentService.selectedCompanyName,this.selectedCompanyName),this._router.navigate(["anal
22ytics","3rdparty","other-assessment",this.selectedCompany.id])}editCompany(){""==this.selectedCompany.name&&(this.selectedCompany.name=this.selectedCompanyName),this._addCompanyModalComponent.showModal(this.selectedCompany),this.isEditingOCA=!1}deleteCompany(){this._confirmAlertManager.showYesOrNoDialog($localize`:analytics/analyticsToolboxComponent|Delete this assessment company question:Are you sure you want to delete this assessment company? If the company is deleted all assessment data linked to the company will also be deleted.`,()=>{this._otherAssessmentService.deleteCompany(this.selectedCompany.id).subscribe(t=>{if(t&&t.affectedRows>0){const n=(0,P.Z)(this.sortedCompanies,a=>a.otherCompany&&a.otherCompany.id==this.selectedCompany.id);this.sortedCompanies.splice(n,1),this._alertMessageService.success($localize`:analytics/analyticsToolboxComponent|Success message to inform that company successfully deleted:Company successfully deleted.`)}else this._alertMessageService.error($localize`:analytics/analyticsToolboxComponent|Error message when is unable to delete new company:Unable to delete new company at this time.`)})})}onSelectOtherCompany(t){this._thirdOtherAssessmentService.setSelectedCompany(t.otherCompany),this._router.navigate(["analytics","3rdparty","oca",t.otherCompany.id])}setMyToolbox(t){t==h.G.NONE?(this._analyticsPosition=t,this._addToolboxResourceModal.showModal()):t===h.G.AIMS_WEB?this._router.navigate(["analytics","3rdparty","aimsweb"]):t===h.G.NWEA?this._router.navigate(["analytics","3rdparty","nwea"]):t===h.G.SBAC?this._router.navigate(["analytics","3rdparty","sbac"]):t===h.G.PARCC?this._router.navigate(["analytics","3rdparty","parcc"]):this._analyticsPosition=t}isCurrentAnalytics(t){return this._analyticsPosition==t}getToolImage(t){return this._toolboxService.getToolImage(t)}getAltImageText(t){return this._toolboxService.getAltImageText(t)}jsonToTools(t){const o=[];return t.hasCustomAssessmentData&&o.push(h.G.OCA),t.hasPARCCData&&o.push(h.G.PARCC),t.hasNWEAData&&o.push(h.G.NWEA),t.hasAIMSData&&o.push(h.G.AIMS_WEB),t.hasSBACData&&o.push(h.G.SBAC),o.length<7&&o.push(h.G.NONE),o.length<100&&o.push(h.G.OTHER),o}hasPermissionToEdit(t){return t.createdByUserId==this.userId}_onDownloadNweaCSVTemplate(){(0,M.WM)(this._apiService.getApiUrl()+"/nwea/get_csv_template","_parent")}_onManageNweaTools(){this._addToolboxResourceModal.showModal(h.G.NWEA,4)}_onNweaHelp(){(0,M.WM)("http://help.otus.com/toolbox/integrate-nwea-data")}_onKhanWebSite(){(0,M.WM)("https://www.khanacademy.org")}_onKhanHelp(){(0,M.WM)("http://help.otus.com/toolbox/integrate-khan-academy")}_onDownloadPARCCCSVTemplate(){(0,M.WM)(this._apiService.getApiUrl()+"/parcc/get_csv_template","_parent")}_onManagePARCCTools(){this._addToolboxResourceModal.showModal(h.G.PARCC,3)}_onPARCCHelp(){(0,M.WM)("http://help.otus.com/toolbox/integrating-parcc-data")}_onDownloadAimswebCSVTemplate(){(0,M.WM)(this._apiService.getApiUrl()+"/aimsweb/get_csv_template","_parent")}_onManageAimswebTools(){this._addToolboxResourceModal.showModal(h.G.AIMS_WEB,3)}_onAimswebHelp(){(0,M.WM)(" http://help.otus.com/toolbox/integrate-aimsweb-data")}_onDownloadOCACSVTemplate(){const t=$localize`:analytics/analyticsToolboxComponent|Part of the text to set filename after download the csv file:Other_Assessment_Template`;de.o.fromStringArray([[$localize`:analytics/analyticsToolboxComponent|Header text for SIS ID column:SIS ID`,$localize`:analytics/analyticsToolboxComponent|Header text for Student Email column:Student Email`,$localize`:analytics/analyticsToolboxComponent|Header text for Assessment Attempt Name column:Assessment Attempt Name`,$localize`:analytics/analyticsToolboxComponent|Header text for Test Date column:Test Date`,$localize`:analytics/analyticsToolboxComponent|Header text for Student Score column:Student Score`,$localize`:analytics/analyticsToolboxComponent|Header text for Student Percentile column:Student Percentile`,$localize`:analytics/analyticsToolboxComponent|Header text for Student Target Score column:Student Target Score`]],t+".csv")}_onAddOCA(){this._addToolboxResourceModal.showModal(h.G.OCA,2)}_onEditOCA(){this.isEditingOCA=!0,this._toolboxService.setEditingOCA(!0)}_onOCAHelp(){(0,M.WM)("http://help.otus.com/analytics/3rd-party/uploading-3rd-party-assessment-data-formerly-known-as-toolbox")}_onDownloadSBACCSVTemplate(){const t=$localize`:analytics/analyticsToolboxComponent|Part of the text to set filename after download the csv file:SBAC_Template`;de.o.fromStringArray([[$localize`:analytics/analyticsToolboxComponent|Header text for Record Type column:RecordType`,$localize`:analytics/analyticsToolboxComponent|Header text for Student Email column:Student Email`,$localize`:analytics/analyticsToolboxComponent|Header text for UIN column:UIN`,$localize`:analytics/analyticsToolboxComponent|Header text for SIS_ID column:SIS_ID`,$localize`:analytics/analyticsToolboxComponent|Header text for Student_Last_Name column:Student_Last_Name`,$localize`:analytics/analyticsToolboxComponent|Header text for Student_First_Name column:Student_First_Name`,$localize`:analytics/analyticsToolboxComponent|Header text for GradeAssessed column:GradeAssessed`,$localize`:analytics/analyticsToolboxComponent|Header text for TestedLEAName1 column:TestedLEAName1`,$localize`:analytics/analyticsToolboxComponent|Header text for TestedSchoolName1 column:TestedSchoolName1`,$localize`:analytics/analyticsToolboxComponent|Header text for TestCompletionDate1 column:TestCompletionDate1`,$localize`:analytics/analyticsToolboxComponent|Header text for TestCompletionDate2 column:TestCompletionDate2`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaimScore1 column:SmarterClaimScore1`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaim1PerformanceLevel column:SmarterClaim1PerformanceLevel`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaimScore2 column:SmarterClaimScore2`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaim2PerformanceLevel column:SmarterClaim2PerformanceLevel`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaimScore3 column:SmarterClaimScore3`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaim3PerformanceLevel column:SmarterClaim3PerformanceLevel`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaimScore4 column:SmarterClaimScore4`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterClaim4PerformanceLevel column:SmarterClaim4PerformanceLevel`,$localize`:analytics/analyticsToolboxComponent|Header text for ScaleScore column:ScaleScore`,$localize`:analytics/analyticsToolboxComponent|Header text for SmarterStandardErrorMeasurement-SEM column:SmarterStandardErrorMeasurement-SEM`,$localize`:analytics/analyticsToolboxComponent|Header text for AchievementLevels column:AchievementLevels`]],t+".csv")}_onManageSBACTools(){this._addToolboxResourceModal.showModal(h.G.SBAC,3)}_onSBACHelp(){(0,M.WM)("http://help.otus.com/analytics/integrating-sbac-data")}onBack(t){this.isEditingOCA=!1,this._toolboxService.setEditingOCA(!1),t?.hasBeenUpdated&&this.getAnalytics3rdParty()}
22updateInsightsContext(){const t=["Third Party - Analytics Landing Page","View: Grid of all configured 3rd-party assessment companies/tiles for this district.","The user has not yet drilled into a specific data source \u2014 they may ask about any available 3rd-party dataset.",`User local time: ${(0,E.Z)(new Date,"yyyy-MM-dd'T'HH:mm:ssXXX")}`].join("\n");this.otusInsightsService.setContextData(t,{landingPage:!0}),this.otusInsightsService.setBehaviorName("Third_Party_Analytics_Chat"),this.otusInsightsService.toggleDisableButton(!1)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Y.l),e.Y36(b._),e.Y36(v.F0),e.Y36(Oe.z),e.Y36(f.Of),e.Y36(Le.Q),e.Y36(F.o),e.Y36(Pe._B),e.Y36(D.l),e.Y36(lt.z),e.Y36(it.G))},s.\u0275cmp=e.Xpm({type:s,selectors:[["ot-analytics-toolbox"]],viewQuery:function(t,o){if(1&t&&(e.Gf(Ve,5),e.Gf(Ke,5),e.Gf(_.zO,5)),2&t){let n;e.iGM(n=e.CRH())&&(o._addToolboxResourceModal=n.first),e.iGM(n=e.CRH())&&(o._addCompanyModalComponent=n.first),e.iGM(n=e.CRH())&&(o.externalTool=n.first)}},decls:11,vars:5,consts:function(){let i;return i=$localize`:analytics/analyticsToolboxComponent|Text Add New to button label␟83fdab3c639248c711dea54964cfa38eaed850b0␟7350139999443310083:Add New`,[[1,"analytics-toolbox-container"],[1,"row"],["
22id","third-party-header",1,"columns","padding-l-0"],[1,"tools-container"],["class","column column-block third-party__table-column",3,"end","click",4,"ngFor","ngForOf"],[3,"currentTools","onAddTool","onAddCompany","selectNewSchoolYear"],[3,"onAddNewCompany","onEditCompany"],["toolboxMenu",""],["ot-option","","role","menuitem",3,"click",4,"ngFor","ngForOf"],[1,"column","column-block","third-party__table-column",3,"click"],[1,"third-party__table-cell",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],["name","plus-circle",1,"new-tool-icon"],[1,"new-tool","new-tool-label"],i,["ot-button","","size","small","color","transparent","class","ot-analytics-toolbox__menu-trigger","aria-label","open actions menu",3,"trim","ot-menu-trigger","menuTemplateContext","click",4,"ngIf"],[3,"company"],["thumbnailComponent",""],["ot-button","","size","small","color","transparent","aria-label","open actions menu",1,"ot-analytics-toolbox__menu-trigger",3,"trim","ot-menu-trigger","menuTemplateContext","click"],["type","actions"],["ot-button","","size","small","color","transparent","aria-label","open actions menu",1,"ot-analytics-toolbox__menu-trigger",3,"trim","ot-menu-trigger","click"],[1,"thumbnail-tool"],["ot-option","","role","menuitem",3,"click"],["slot","before-label"],["prefix","fas",3,"name"],["slot","label"]]},template:function(t,o){1&t&&(e.TgZ(0,"div",0)(1,"article")(2,"div",1),e._UZ(3,"div",2),e.qZA(),e.TgZ(4,"div",3),e.YNc(5,Qo,5,9,"div",4),e.qZA()(),e.TgZ(6,"ot-add-toolbox-resource-modal",5),e.NdJ("onAddTool",function(){return o.onAddTool()})("onAddCompany",function(){return o.addCompany()})("selectNewSchoolYear",function(a){return o.schoolYearForSBAC=a}),e.qZA()(),e.TgZ(7,"add-company-modal",6),e.NdJ("onAddNewCompany",function(a){return o.onAddNewCompany(a)})("onEditCompany",function(a){return o.onEditCompany(a)}),e.qZA(),e.TgZ(8,"ot-menu",null,7),e.YNc(10,Vo,5,2,"li",8),e.qZA()),2&t&&(e.Udp("display",o.isEditingOCA||o.isOtherCompanyPage?"none":"flex"),e.xp6(5),e.Q6J("ngForOf",o.sortedCompanies),e.xp6(1),e.Q6J("currentTools",o._tools),e.xp6(4),e.Q6J("ngForOf",o.menuOptions))},dependencies:[Ce.zx,ee.J,me.g,qe.v,je.b,et.Wx,l.sg,l.O5,l.RF,l.n9,l.ED,ko,Ve,Ke],styles:["[_nghost-%COMP%]{display:block;padding-block-end:var(--ot-spacing-xl)}.ot-analytics-toolbox__menu-trigger[_ngcontent-%COMP%]{position:absolute;top:0;right:0}.analytics-toolbox-container[_ngcontent-%COMP%]{flex-direction:column;padding-left:5px}#third-party-header[_ngcontent-%COMP%]{margin-top:4px}article[_ngcontent-%COMP%]{padding-bottom:30px}"]}),s})(),qo=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275cmp=e.Xpm({type:s,selectors:[["analytics-toolbox-container"]],decls:1,vars:0,template:function(t,o){1&t&&e._UZ(0,"router-outlet")},dependencies:[v.lC],encapsulation:2}),s})();var jo=r(31014),en=r(11413),tn=r(52894),fe=r(24435),on=r(51135),tt=r(41854),Q=r(84347),Ge=r(73563);function nn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",4)(1,"ot-icon",5),e.NdJ("click",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.backToStepThree())}),e.qZA()()}}function sn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"otus-button",11),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.onClickNext())}),e.qZA()}if(2&s){const t=e.oxw(2);e.Q6J("inactive",!t.isAssessmentValid())}}function an(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"otus-button",12),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.onClickNext())}),e.qZA()}if(2&s){const t=e.oxw(2);e.Q6J("inactive",!t.isAssessmentValid())}}function ln(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div")(1,"div",6)(2,"otus-input",7),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.assessment.assessmentName=n)}),e.qZA()(),e.TgZ(3,"div",8),e.YNc(4,sn,1,1,"otus-button",9),e.YNc(5,an,1,1,"otus-button",10),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.assessment.assessmentName)("required",!0)("width",450)("showCharsCount",!0)("maxlength",200),e.xp6(2),e.Q6J("ngIf",t.isEditing),e.xp6(1),e.Q6J("ngIf",!t.isEditing)}}function rn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"tr")(1,"td",22)(2,"otus-input",23),e.NdJ("ngModelChange",function(n){const c=e.CHM(t).$implicit;return e.KtG(c.name=n)}),e.qZA()(),e.TgZ(3,"td",24)(4,"otus-input",25),e.NdJ("ngModelChange",function(n){const c=e.CHM(t).$implicit;return e.KtG(c.value=n)}),e.qZA()(),e.TgZ(5,"td",26)(6,"ot-icon",27),e.NdJ("click",function(n){const a=e.CHM(t),c=a.$implicit,S=a.index;return e.oxw(2).confirmRemoveTarget(c.id,S),e.KtG(n.stopPropagation())}),e.qZA()()()}if(2&s){const t=i.$implicit;e.xp6(2),e.Q6J("ngModel",t.name)("required",!0)("width",212),e.xp6(2),e.Q6J("ngModel",t.value)("required",!0)("width",150)("type","number")("step","0.01")}}
22function _n(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div")(1,"div",13)(2,"otus-input",14),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw();return e.KtG(a.group.name=n)}),e.qZA()(),e.TgZ(3,"div",15)(4,"table",16)(5,"tbody"),e.YNc(6,rn,7,8,"tr",17),e.TgZ(7,"tr")(8,"td",18)(9,"otus-button",19),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.addTargetSetRow())}),e.qZA()()()()()(),e.TgZ(10,"div",20)(11,"otus-button",21),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.onClickSaveTargetSets())}),e.qZA()()()}if(2&s){const t=e.oxw();e.xp6(2),e.Q6J("ngModel",t.group.name)("required",!0)("width",450)("showCharsCount",!0)("maxlength",200),e.xp6(4),e.Q6J("ngForOf",t.targetSets),e.xp6(3),e.Q6J("size","small-size"),e.xp6(2),e.Q6J("inactive",!t.validateGroupOfTargetSets())}}function cn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"tr")(1,"td",22),e._uU(2),e.qZA(),e.TgZ(3,"td",24)(4,"ot-icon",36),e.NdJ("click",function(n){const c=e.CHM(t).index;return e.oxw(2).onClickEditTargetSet(c),e.KtG(n.stopPropagation())}),e.qZA()(),e.TgZ(5,"td",26)(6,"ot-icon",27),e.NdJ("click",function(n){const c=e.CHM(t).index;return e.oxw(2).onClickDeleteTargetSet(c),e.KtG(n.stopPropagation())}),e.qZA()()()}if(2&s){const t=i.$implicit;e.xp6(2),e.hij(" ",t.name," ")}}function dn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div")(1,"div",28)(2,"table",29)(3,"thead")(4,"tr")(5,"th"),e.SDv(6,30),e.qZA(),e._UZ(7,"th")(8,"th"),e.qZA()(),e.TgZ(9,"tbody"),e.YNc(10,cn,7,1,"tr",17),e.qZA()()(),e.TgZ(11,"div",31)(12,"div",32)(13,"otus-button",33),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.onClickAddTargetSetButton())}),e.qZA()(),e.TgZ(14,"div",34)(15,"otus-button",35),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.onClickDoneButton())}),e.qZA()()()()}if(2&s){const t=e.oxw();e.xp6(10),e.Q6J("ngForOf",t.groupOfGroupedTargetSets),e.xp6(3),e.Q6J("iconPrefix","fas")("icon","fa-plus")("color","invisible-light")}}let ot=(()=>{class s{constructor(t,o,n){this._alertMessageService=t,this._otherAssessmentService=o,this._confirmAlertManager=n,this.isTargetSetEdit=!0,this.onEditAssessment=new e.vpe,this.refreshAssessmentList=new e.vpe,this.modalTitle=$localize`:analytics/addOtherAssessmentModalComponent|Text to modal title:Add a New Assessment`,this.assessment=new fe.j,this.clonedAssessment=new fe.j,this.currentStep=1,this.targetSets=[],this.groupOfGroupedTargetSets=[],this.isBackButtonShowing=!0,this.isEditing=!1}showModal(t){this._clearAndResetModal(),t?t&&(this.assessment=t,this.isEditTargetSet=!0,this.getTargetSets(t.id),this.currentStep=3,this.isBackButtonShowing=!1,this.modalTitle=t.assessmentName+$localize`:analytics/addOtherAssessmentModalComponent|Part of the text to modal title: - Target Sets`,this.newModal.showModal()):(this.newModal.showModal(),this.isEditTargetSet=!1,this.group=new Ge.K,this.target=new Q.H,this.targetSets.push(new Q.H,new Q.H,new Q.H,new Q.H))}editAssessmentDetails(t){this.currentStep=1,this.isEditing=!0,this.modalTitle=$localize`:analytics/addOtherAssessmentModalComponent|Text to modal title:Edit Assessment`,this.assessment=t,this.clonedAssessment=(0,p.Z)(t),this.newModal.showModal()}_clearAndResetModal(){this.clearForm(),this.resetModal()}closeModal(){this._clearAndResetModal(),this.newModal.closeModal()}clearForm(){this.group=new Ge.K,this.target=new Q.H,this.targetSets=[],this.assessment=new fe.j}resetModal(){this.currentStep=1,this.modalTitle=$localize`:analytics/addOtherAssessmentModalComponent|Text to modal title:Add a New Assessment`,this.resetIsEditing()}backToStepThree(){this.setModalToStepThree()}resetIsEditing(){this.isEditing=!1}isAssessmentValid(){return this.isEditing?!this.assessment.isEqualTo(this.clonedAssessment)&&this.assessment.isValidAssessment():this.assessment.isValidAssessment()}onClickNext(){this.isEditing?this.isAssessmentValid()&&this._editAssessment():1==this.currentStep&&(this.isAssessmentValid()&&this._saveAssessment(),this.setModalToStepTwo())}_saveAssessment(){this._otherAssessmentService.createAssessment(this.assessment,this.companyId).subscribe(t=>{t&&t.insertId>0?(this._alertMessageService.success($localize`:analytics/addOtherAssessmentModalComponent|Successfully added 3rd Party assessment message:3rd Party assessment added successfully.`),this.assessment.id=t.insertId,this.refreshAssessmentList.emit(null)):this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform that is unable to create 3rd Party assessment:Unable to create 3rd Party assessment at this time.`)})}_editAssessment(){this.assessment&&this._otherAssessmentService.editAssessment(this.assessment).subscribe(t=>{t?.success&&(this.onEditAssessment.emit(this.assessment),this.closeModal(),this._alertMessageService.success($localize`:analytics/addOtherAssessmentModalComponent|Successfully edited 3rd Party assessment message:3rd Party assessment edited successfully.`))})}addTargetSetRow(){this.targetSets.push(new Q.H)}validateGroupOfTargetSets(){return this.isEditing?this.validateTargetSetNamesAndValues()&&this.validateEditsToGroupOfTargetSets():this.validateTargetSetNamesAndValues()}validateEditsToGroupOfTargetSets(){const t=this.group.name!==this.clonedGroup.name;
22this.targetSets.forEach(n=>{n.value=Number(n.value)});const o=!(0,tt.Z)(this.targetSets,this.clonedGroup.targetSets);return t||o}validateTargetSetNamesAndValues(){let t=0,o=0,n=0,a=!1,c=!1,S=!1;return this.targetSets.forEach((g,B)=>{const z=void 0!==g.name&&""!==g.name,y=this.targetSets.some((Ae,W)=>Ae.name==g.name&&W!==B),X=void 0!==g.value&&""!==g.value.toString(),U=this.targetSets.some((Ae,W)=>Ae.value==g.value&&W!==B);z&&!X?t+=1:!z&&X?o+=1:z||X?y?(this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform this name must be unique:Target set name must be unique.`),c=!0):U&&(this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform this value must be unique:Target set value must be unique.`),a=!0):n+=1}),S=t==o&&n!==this.targetSets.length,void 0!==this.group.name&&""!==this.group.name&&S&&!(a||c)}onClickSaveTargetSets(){var t;this.group.assessmentId=this.assessment.id;const o=this._removeBlankTargetSets();this.group.targetSets=o,null!==(t=this.group.targetSets)&&void 0!==t&&t.length&&this.group.targetSets.length>0?2!=this.currentStep||this.isEditing?2==this.currentStep&&this.isEditing&&this.editTargetSetGroup(this.group):this.addTargetSetGroup(this.group):this._confirmAlertManager.showYesOrNoDialog($localize`:analytics/addOtherAssessmentModalComponent|Delete this target set question:Are you sure you want to delete this target set?`,()=>{this.deleteTargetSet(this.groupId)})}_removeBlankTargetSets(){const t=[];for(const o of this.targetSets)o.name&&""!==o.name&&(o.value||0===o.value)&&t.push(o);return t}addTargetSetGroup(t){this._otherAssessmentService.addTargetSet(t).subscribe(o=>{o&&o.groupId>0?(this._alertMessageService.success($localize`:analytics/addOtherAssessmentModalComponent|Successfully added target set message:Target set added successfully.`),this.getTargetSets(this.assessment.id),this.setModalToStepThree()):this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform that is unable to add target set:Unable to add a target set at this time.`)})}editTargetSetGroup(t){this._otherAssessmentService.editTargetSets(t).subscribe(o=>{o&&o.length>0?(this._alertMessageService.success($localize`:analytics/addOtherAssessmentModalComponent|Successfully edited target set message:Target set edited successfully.`),this.resetIsEditing(),this.getTargetSets(this.assessment.id),this.setModalToStepThree()):this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform that is unable to edit target set:Unable to edit target set at this time.`)})}setModalToStepThree(){this.currentStep=3,this.modalTitle=this.assessment.assessmentName+$localize`:analytics/addOtherAssessmentModalComponent|Part of the text to modal title: - Target Sets`,this.isBackButtonShowing=!1}confirmRemoveTarget(t,o){this._confirmAlertManager.showYesOrNoDialog($localize`:analytics/addOtherAssessmentModalComponent|Remove this target question:Are you sure you want to remove this target?`,()=>{this.deleteTargetSetRow(t,o)})}deleteTargetSetRow(t,o){if(!t)return this.targetSets.splice(o,1);this._otherAssessmentService.deleteTarget(t).subscribe(n=>{n?.success?(this.targetSets.splice(o,1),this._alertMessageService.success($localize`:analytics/addOtherAssessmentModalComponent|Successfully removed target message:Target successfully removed.`)):this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform that was an error removing the target:There was an error removing the target.`)})}onClickAddTargetSetButton(){3==this.currentStep&&(this.group=new Ge.K,this.target=new Q.H,this.targetSets=[],this.targetSets.push(new Q.H,new Q.H,new Q.H,new Q.H),this.setModalToStepTwo())}setModalToStepTwo(){this.currentStep=2,this.isBackButtonShowing=!0,this.modalTitle=$localize`:analytics/addOtherAssessmentModalComponent|Text to modal title:Add a Target Set`}onClickDoneButton(){this.refreshAssessmentList.emit(null),this.closeModal()}getTargetSets(t){this._otherAssessmentService.getTargetSets(t).subscribe(o=>{o?.success?this.groupOfGroupedTargetSets=o.results:this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform that could not retrieve target sets:Could not retrieve target sets at this time.`)})}onClickEditTargetSet(t){this.group=this.groupOfGroupedTargetSets[t],this.targetSets=this.group.targetSets,this.isEditing=!0,this.clonedGroup=(0,p.Z)(this.group),this.currentStep=2}
22onClickDeleteTargetSet(t){this._confirmAlertManager.showYesOrNoDialog($localize`:analytics/addOtherAssessmentModalComponent|Delete this target set question:Are you sure you want to delete this target set? If all target sets are deleted, data will not be viewable.`,()=>{this.groupId=this.groupOfGroupedTargetSets[t].id,this.deleteTargetSet(this.groupId,t)})}deleteTargetSet(t,o){this._otherAssessmentService.deleteTargetSet(t).subscribe(n=>{n&&n[0].affectedRows>0&&n[1].affectedRows>0?(this._alertMessageService.success($localize`:analytics/addOtherAssessmentModalComponent|Successfully deleted target set message:Target set successfully deleted.`),3==this.currentStep?this.groupOfGroupedTargetSets.splice(o,1):(this.getTargetSets(this.assessment.id),this.currentStep=3,this.modalTitle=this.assessment.assessmentName+$localize`:analytics/addOtherAssessmentModalComponent|Part of the text to modal title: - Target Sets`)):this._alertMessageService.error($localize`:analytics/addOtherAssessmentModalComponent|Error message to inform that could not delete target sets:Could not delete target set at this time.`)})}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(f.Of),e.Y36(Oe.z),e.Y36(Le.Q))},s.\u0275cmp=e.Xpm({type:s,selectors:[["add-other-assessment-modal"]],viewQuery:function(t,o){if(1&t&&e.Gf(Se.P,5),2&t){let n;e.iGM(n=e.CRH())&&(o.newModal=n.first)}},inputs:{companyId:"companyId",isTargetSetEdit:"isTargetSetEdit"},outputs:{onEditAssessment:"onEditAssessment",refreshAssessmentList:"refreshAssessmentList"},decls:6,vars:6,consts:function(){let i,t,o,n,a,c,S,I,g,B,z,y,X;return i=$localize`:analytics/addOtherAssessmentModalComponent|Text Assessment Name to input placeholder␟4d4a3987b8b719ffd4e6869a4a80eaa7e0c502d7␟6941585126501968339:Assessment Name`,t=$localize`:analytics/addOtherAssessmentModalComponent|Text Assessment Name to input label␟4d4a3987b8b719ffd4e6869a4a80eaa7e0c502d7␟6941585126501968339:Assessment Name`,o=$localize`:analytics/addOtherAssessmentModalComponent|Save button␟f13c5ddba4395bca7d877441696c4f12f5654b5b␟7433678160162667351:Save`,n=$localize`:analytics/addOtherAssessmentModalComponent|Next button␟e975dbcd409b130d4d684feccb7faa13c162c1eb␟7666818037446486845:Next`,a=$localize`:analytics/addOtherAssessmentModalComponent|Text Target Set Name to input placeholder␟446af94b23ea02c790394dc981379b645f914cac␟4773227419475219972:Target Set Name`,c=$localize`:analytics/addOtherAssessmentModalComponent|Text Target Set to input label␟ebb87fe396e5d6145d1389a16a8877bde953f46c␟5004735843368008000:Target Set`,S=$localize`:analytics/addOtherAssessmentModalComponent|Add Target button␟0e0cb5e2849967447ca95975732d1ee9e37b3235␟2918953210945270157:Add Target`,I=$localize`:analytics/addOtherAssessmentModalComponent|Save button␟f13c5ddba4395bca7d877441696c4f12f5654b5b␟7433678160162667351:Save`,g=$localize`:analytics/addOtherAssessmentModalComponent|Text Target Name to input placeholder␟f8d04e6b3b44c346709f45aa82ddde2ee8a2466d␟7879124031971997112:Target Name`,B=$localize`:analytics/addOtherAssessmentModalComponent|Text Minimum Score to input
23                    placeholder␟8f27b03e52a3df5071736b8d4c4d5f0bd737c95c␟6689524961444184526:Minimum Score`,z=$localize`:analytics/addOtherAssessmentModalComponent|Text to table header␟31961eb33263af6ce15fb9d60c4f43efa1b2c621␟749791058678903147: Target Set Name `,y=$localize`:analytics/addOtherAssessmentModalComponent|Add Target Set button␟98b2a320026547b6e5a0f9361c8cc3e576503f83␟7680592157805499057:Add Target Set`,X=$localize`:analytics/addOtherAssessmentModalComponent|Done button␟f25be314e81b69d3f34e4dd2a26bcf50f8b5300b␟690021093542160078:Done`,[[3,"size","title"],["class","back-btn",4,"ngIf"],[1,"add-other-assessment-container"],[4,"ngIf"],[1,"back-btn"],["name","chevron-left",3,"click"],[1,"add-other-assessment-container__name"],["placeholder",i,"label",t,3,"ngModel","required","width","showCharsCount","maxlength","ngModelChange"],[1,"add-other-assessment-container__next"],["buttonText",o,3,"inactive","onClick",4,"ngIf"],["buttonText",n,3,"inactive","onClick",4,"ngIf"],["buttonText",o,3,"inactive","onClick"],["buttonText",n,3,"inactive","onClick"],[1,"add-other-assessment-container__target-set"],["placeholder",a,"label",c,3,"
23ngModel","required","width","showCharsCount","maxlength","ngModelChange"],[1,"add-other-assessment-container__add-targets-table-wrapper"],[1,"otus-small-table","add-target-set-table"],[4,"ngFor","ngForOf"],[1,"add-target-button-cell"],["buttonText",S,3,"size","onClick"],[1,"add-other-assessment-container__save"],["buttonText",I,"icon","fa-save","iconPrefix","far",3,"inactive","onClick"],[1,"first"],["placeholder",g,3,"ngModel","required","width","ngModelChange"],[1,"second"],["placeholder",B,3,"ngModel","required","width","type","step","ngModelChange"],[1,"third"],["prefix","fas","name","trash",3,"click"],[1,"add-other-assessment-container__target-set-list-table-wrapper"],[1,"otus-small-table","target-set-list-table"],z,[1,"add-other-assessment-container__button-container"],[1,"add-target-set-button"],["buttonText",y,3,"iconPrefix","icon","color","onClick"],[1,"done-button"],["buttonText",X,3,"onClick"],["prefix","fas","name","pencil-alt",3,"click"]]},template:function(t,o){1&t&&(e.TgZ(0,"ot-new-modal",0),e.YNc(1,nn,2,0,"div",1),e.TgZ(2,"div",2),e.YNc(3,ln,6,7,"div",3),e.YNc(4,_n,12,8,"div",3),e.YNc(5,dn,16,4,"div",3),e.qZA()()),2&t&&(e.Q6J("size","medium")("title",o.modalTitle),e.xp6(1),e.Q6J("ngIf",o.isEditTargetSet&&2==o.currentStep),e.xp6(2),e.Q6J("ngIf",1==o.currentStep),e.xp6(1),e.Q6J("ngIf",2==o.currentStep),e.xp6(1),e.Q6J("ngIf",3==o.currentStep))},dependencies:[N.JJ,N.Q7,N.nD,N.On,Se.P,ie.A,j.d,ee.J,l.sg,l.O5],encapsulation:2}),s})();var mn=r(14177),ke=r(97639),pn=r(48263);const un=["fileInput"];function Tn(s,i){if(1&s&&(e.TgZ(0,"li"),e._uU(1),e.qZA()),2&s){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function Sn(s,i){if(1&s&&(e.TgZ(0,"div")(1,"div",15)(2,"div",16)(3,"div",17)(4,"h5"),e.SDv(5,18),e.qZA(),e.TgZ(6,"ul"),e.YNc(7,Tn,2,1,"li",19),e.qZA()()()()()),2&s){const t=e.oxw();e.xp6(7),e.Q6J("ngForOf",t.uploadErrors)}}function An(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"div",20)(1,"otus-button",21),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.deleteAttempts())}),e.qZA()()}}function gn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"td",23)(1,"div",24)(2,"font-awesome-checkbox",25),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.checkOneCheckbox(n))}),e.qZA()(),e.TgZ(3,"div",26),e._uU(4),e.qZA()()}if(2&s){const t=e.oxw().$implicit;e.xp6(2),e.Q6J("checked",t.checked)("iconPrefix","fas"),e.xp6(2),e.hij(" ",t.name," ")}}function hn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"td",23)(1,"div",24)(2,"font-awesome-checkbox",25),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.checkOneCheckbox(n))}),e.qZA()(),e.TgZ(3,"otus-input",38),e.NdJ("ngModelChange",function(n){e.CHM(t);const a=e.oxw().$implicit;return e.KtG(a.name=n)})("focus",function(){e.CHM(t);const n=e.oxw(3);return e.KtG(n.nameShouldError=!1)})("blur",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.resetEditAttempt(n))})("onPressEnter",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.saveAttemptName(n))}),e.qZA()()}if(2&s){const t=e.oxw().$implicit,o=e.oxw(2);e.xp6(2),e.Q6J("checked",t.checked)("iconPrefix","fas"),e.xp6(1),e.ekj("no-error",!o.nameShouldError),e.Q6J("ngModel",t.name)("required",!0)("maxlength",60)("shouldError",o.nameShouldError)}}function Cn(s,i){1&s&&e._UZ(0,"td",32)}function On(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"td",32)(1,"ot-icon",39),e.NdJ("click",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.onClickEditAttempt(n))}),e.qZA(),e.TgZ(2,"ot-icon",40),e.NdJ("click",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.deleteAttempts(n))}),e.qZA()()}}const fn=function(s){return{"new-upload":s}};function En(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"tr",35),e.NdJ("mouseenter",function(){const a=e.CHM(t).index,c=e.oxw(2);return e.KtG(c.showButtons(a))})("mouseleave",function(){e.CHM(t);const n=e.oxw(2);return e.KtG(n.showButtons(-1))}),e.YNc(1,gn,5,3,"td",36),e.YNc(2,hn,4,8,"td",36),e.TgZ(3,"td",28),e._uU(4),e.ALo(5,"otDateTimeFormat"),e.qZA(),e.TgZ(6,"td",30),e._uU(7),e.qZA(),e.YNc(8,Cn,1,0,"td",37),e.YNc(9,On,3,0,"td",37),e.qZA()}if(2&s){const t=i.$implicit,o=i.index,n=e.oxw(2);e.Q6J("ngClass",e.VKq(10,fn,t.newUpload)),e.xp6(1),e.Q6J("ngIf",n.editingName.index!==o),e.xp6(1),e.Q6J("ngIf",n.editingName.index==o),e.xp6(2),e.Oqu(e.xi3(5,7,t.createdDate,"shortDate")),e.xp6(3),e.Oqu(t.uploadedBy),e.xp6(1),e.Q6J("ngIf",n.selectedIndex!==o),e.xp6(1),e.Q6J("ngIf",n.selectedIndex==o)}}
23function Mn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"table",22)(1,"thead")(2,"tr")(3,"th",23)(4,"div",24)(5,"font-awesome-checkbox",25),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw();return e.KtG(n.checkAllCheckboxes())}),e.qZA()(),e.TgZ(6,"div",26),e.SDv(7,27),e.qZA()(),e.TgZ(8,"th",28),e.SDv(9,29),e.qZA(),e.TgZ(10,"th",30),e.SDv(11,31),e.qZA(),e._UZ(12,"th",32),e.qZA()(),e.TgZ(13,"div",33)(14,"tbody"),e.YNc(15,En,10,12,"tr",34),e.qZA()()()}if(2&s){const t=e.oxw();e.xp6(5),e.Q6J("checked",t.allChecked)("iconPrefix","fas"),e.xp6(10),e.Q6J("ngForOf",t.attempts)}}function Nn(s,i){1&s&&(e.TgZ(0,"div",41)(1,"div",42),e._UZ(2,"ot-icon",43),e.TgZ(3,"p",44),e.SDv(4,45),e.qZA(),e.TgZ(5,"p",46),e.SDv(6,47),e.qZA()()())}let nt=(()=>{class s{constructor(t,o,n,a){this._ocaService=t,this._otherAssessmentService=o,this._alertMessageService=n,this._simpleMessageManager=a,this.attempts=[],this.fileProgressText="",this.readyForData=!1,this.selectedIndex=-1,this.lengthOfOriginalArray=0,this.numberNewUploads=0,this.pageFirstLoad=!0,this.allChecked=!1,this.checkboxCount=0,this.editingName={index:-1},this.nameShouldError=!1,this.nameEdited=!1,this.fileProgress=null}getAttemptDataForAssessment(t){t&&(this.assessment=t),this._ocaService.getAssessmentAttemptNames(this.assessment.id).subscribe(o=>{o?(this.attempts=o,this.pageFirstLoad||(this.numberNewUploads=this.attempts.length-this.lengthOfOriginalArray),this.lengthOfOriginalArray=this.attempts.length,this.pageFirstLoad=!1,this._sortAttemptData(),this.readyForData=!0,this.modalComponent.showModal()):this._alertMessageService.error($localize`:analytics/manageAttemptDataModal|Error message to inform that is unable to get assessment attempts:Unable to get assessment attempts at this time.`)})}_sortAttemptData(){this.attempts=this.attempts.sort((t,o)=>{const n=(0,ke.zg)(t.date,o.date);return t<o?n:-n}),this.attempts.map(t=>{t.newUpload=!1}),this.numberNewUploads&&this._applyNewUploadClass()}_applyNewUploadClass(){for(let t=0;t<this.numberNewUploads;t++)this.attempts[t].newUpload=!0;this.numberNewUploads=0,this.lengthOfOriginalArray=this.attempts.length}onCloseModal(){this._resetModal()}_resetModal(){this.clearUploadErrors(),this.numberNewUploads=0,this.lengthOfOriginalArray=0,this.pageFirstLoad=!1,this.checkboxCount=0,this.resetNameEdited(),this.resetEditNameIndex(),this.clonedAttempt=null,this.allChecked=!1}clearUploadErrors(){this.uploadErrors=null}resetFileInput(){this.fileInput.nativeElement.value=""}showButtons(t){this.selectedIndex=t}onClickEditAttempt(t){this.clonedAttempt=(0,p.Z)(t),this.editingName={index:this.selectedIndex}}resetEditAttempt(t){this.resetAttemptName(t),this.resetNameEdited(),this.resetEditNameIndex(),this.clonedAttempt=null}saveAttemptName(t){this.checkForNameErrors(t),this.checkIfEdited(t),!this.nameShouldError&&this.nameEdited?this._otherAssessmentService.editAttempt(t,this.clonedAttempt).subscribe(o=>{o?(this.updateAttemptNameOnPageUntilRefresh(t),this.resetEditNameIndex(),this.resetNameEdited(),this.clonedAttempt=null,this._alertMessageService.success($localize`:analytics/manageAttemptDataModal|Successfully edited attempt name:Attempt name edited successfully.`)):(this.resetAttemptName(t),this._alertMessageService.error($localize`:analytics/manageAttemptDataModal|Error message to inform that is unable to edit the attempt name:Unable to edit the attempt name.`))}):this.nameShouldError||this.nameEdited?(""==t.name||null==t.name||null==t.name)&&this._alertMessageService.warning($localize`:analytics/manageAttemptDataModal|Warning message to inform that all attempts must have a name:All attempts must have a name.`):(this.resetEditAttempt(t),this._alertMessageService.warning($localize`:analytics/manageAttemptDataModal|Warning message to inform that no changes were made:No changes were made to the attempt name. Preserving original attempt name.`))}checkForNameErrors(t){this.nameShouldError=!t.name||0===t.name.length}checkIfEdited(t){this.nameEdited=!(0,tt.Z)(t,this.clonedAttempt)}updateAttemptNameOnPageUntilRefresh(t){const o=(0,P.Z)(this.attempts,n=>n.id==t.id&&n.createdDate==t.createdDate);this.attempts[o].name=t.name}resetAttemptName(t){t.name=this.clonedAttempt.name}resetNameEdited(){this.nameEdited=!1}resetEditNameIndex(){this.editingName={index:-1}}onClickDownloadTemplate(){this._onDownloadOCACSVTemplate()}_onDownloadOCACSVTemplate(){const t=$localize`:analytics/manageAttemptDataModal|Part of the text to set filename after download the csv file:Other_Assessment_Template`;de.o.fromStringArray([[$localize`:analytics/manageAttemptDataModal|Header text for SIS ID column:SIS ID`,$localize`:analytics/manageAttemptDataModal|Header text for Student Email column:Student Email`,$localize`:analytics/manageAttemptDataModal|Header text for Assessment Attempt Name column:Assessment Attempt Name`,$localize`:analytics/manageAttemptDataModal|Header text for Test Date column:Test Date`,$localize`:analytics/manageAttemptDataModal|Header text for Student Score column:Student Score`,$localize`:analytics/manageAttemptDataModal|Header text for Student Percentile column:Student Percentile`,$localize`:analytics/manageAttemptDataModal|Header text for Student Target Score column:Student Target Score`]],t+".csv")}onFileUpload(t){t?.target&&t.target.files&&t.target.files.length>0&&(this.fileProgress=0,this.fileProgressText=$localize`:analytics/manageAttemptDataModal|Text to progess upload status:: Preparing upload...`,this._ocaService.uploadAttempt(this.assessment,t.target.files,o=>{this.fileProgressText=$localize`:analytics/manageAttemptDataModal|Text to progess upload status:: Uploading...`,this.fileProgress=~~(100*o.loaded/o.total)}).then(o=>{var n;null!==(n=o.error)&&void 0!==n&&n.length?(this.fileProgressText="",this.fileProgress=void 0,this.reportFileUploadErrorToUser(o)):(this.fileProgressText="",this.fileProgress=null,this._alertMessageService.success($localize`:analytics/manageAttemptDataModal|Successfully uploaded data:Data uploaded successfully.`),this.getAttemptDataForAssessment())},o=>{this.fileProgressText="",this.fileProgress=void 0;const n=JSON.parse(o);this.reportFileUploadErrorToUser(n)}).catch(o=>console.error(o))),this.resetFileInput()}reportFileUploadErrorToUser(t){if(t&&!t.error.code&&(0,mn.Z)(t.error)){const o=[];t.error.forEach(n=>{const a=n.constructor==={}.constructor?JSON.stringify(n):n;o.push(a)}),this.uploadErrors=o}}
23checkAllCheckboxes(){this.toggleAllChecked(),this.setIndividualCheckboxes(),this.updateCheckboxCount()}toggleAllChecked(){this.allChecked=!this.allChecked}setIndividualCheckboxes(){this.attempts.map(1==this.allChecked?t=>{t.checked=!0}:t=>{t.checked=!1})}checkOneCheckbox(t){this.toggleCheckbox(t),this.updateCheckboxCount(),this.resetAllChecked()}toggleCheckbox(t){t.checked=!t.checked}updateCheckboxCount(){this.checkboxCount=this.attempts.filter(t=>1==t.checked).length}resetAllChecked(){this.allChecked=this.checkboxCount==this.attempts.length}deleteAttempts(t){let o=[];t?o.push(t):o=this.setAttemptsToDelete(),this._simpleMessageManager.showYesOrNoDialog($localize`:analytics/manageAttemptDataModal|Delete attempt question:Are you sure you want to delete attempt(s)?`,()=>{this._otherAssessmentService.deleteAttempt(o).subscribe(n=>{n?.success?(this.removeDeletedItemsFromAttempts(n.result,o),this.resetAllChecked(),this.updateCheckboxCount(),this._alertMessageService.success($localize`:analytics/manageAttemptDataModal|Successfully deleted attempts:Attempt(s) deleted successfully.`)):this._alertMessageService.error($localize`:analytics/manageAttemptDataModal|Error message to inform that is unable to delete multiple attempts:Unable to delete multiple attempts at this time.`)})})}setAttemptsToDelete(){return 1==this.allChecked?this.attempts:this.attempts.filter(t=>1==t.checked)}removeDeletedItemsFromAttempts(t,o){if(o.length>1)this.attempts=this.attempts.filter(n=>!t.some(a=>a.id==n.id&&a.name==n.name&&(0,ke.xu)(n.createdDate,"YYYY-MM-DD HH:mm:ss")==(0,ke.xu)(a.createdDate,"YYYY-MM-DD HH:mm:ss")));else if(1==o.length){const n=(0,P.Z)(this.attempts,a=>a.createdDate==o[0].createdDate&&a.name==o[0].name);this.attempts.splice(n,1)}}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Ze.c),e.Y36(Oe.z),e.Y36(f.Of),e.Y36(he.$))},s.\u0275cmp=e.Xpm({type:s,selectors:[["manage-attempt-data-modal"]],viewQuery:function(t,o){if(1&t&&(e.Gf(Se.P,5),e.Gf(un,5)),2&t){let n;e.iGM(n=e.CRH())&&(o.modalComponent=n.first),e.iGM(n=e.CRH())&&(o.fileInput=n.first)}},inputs:{assessment:"assessment"},decls:17,vars:5,consts:function(){let i,t,o,n,a,c,S,I,g,B,z;return i=$localize`:analytics/manageAttemptDataModal|Text to modal header␟7e235c38235a9b884eb9b0720e0951a3fab3a951␟5482282524175070217:Manage Data`,t=$localize`:analytics/manageAttemptDataModal|Download template button␟cba63844e38b544ae24e3843b4bd8b16f4dc7cd9␟185522031805128448:Download Template`,o=$localize`:analytics/manageAttemptDataModal|Upload Data button␟496632aabb025fe38e570cabacc48a2ac1286f48␟3703554456532876119:Upload Data`,n=$localize`:analytics/manageAttemptDataModal|Text to inform that were errors uploading file␟27237de14bef898c70f870316d644af817b190b9␟1922441233766660842: There were errors uploading this file: `,a=$localize`:analytics/manageAttemptDataModal|Delete Multiple Attempts button␟b5ed2259f82d620b1024563ac6ee31d8a1836297␟1966797548025887399:Delete Multiple Attempts`,c=$localize`:analytics/manageAttemptDataModal|Text to Attempt Name table header␟ce853983088bf74969f60ea1889542ef1faefe45␟6606520796127174437: Attempt Name `,S=$localize`:analytics/manageAttemptDataModal|Text to Upload Date table header␟92d0257c209bd4e8914bca52269032b3107fe06d␟2690028323830721656: Upload Date `,I=$localize`:analytics/manageAttemptDataModal|Text to Uploaded By table header␟85abc20e7e096b6d22f0ee5f784f3ec9b5983b96␟8904118591151414886: Uploaded By `,g=$localize`:analytics/manageAttemptDataModal|Text Attempt Name to input placeholder␟d726696ee3fc3cbfc8d2ecb7c686101fded6a06d␟9187517569529818912:Attempt Name`,B=$localize`:analytics/manageAttemptDataModal|Text to inform that it's time to upload data␟c095baa6a808dd0e7e35b83a19d21064106406e6␟648983139264970092: It’s data upload time! `,z=$localize`:analytics/manageAttemptDataModal|Text to inform how to upload data clicking in the
24            button above␟acf7baa27d22582cb461d97d96f23c9c9527c0db␟7069520947270388284: Click the Upload Data button above to add your data set for this assessment. `,[["size","large","customStyles","manage-attempt-data-modal",3,"onCloseModal"],[1,"header"],i,[1,"button-container"],["buttonText",t,"icon","fas fa-download","color","invisible-light",3,"onClick"],["buttonText",o,"icon","fas fa-upload","color","invisible-light",3,"onClick"],["type","file","accept","text/csv",1,"input-upload",3,"change"],["fileInput",""],[4,"ngIf"],[1,"body"],[1,"title-button-container"],["id","assessment-name"],["id","delete-multiple-attempts-button",4,"ngIf"],["class","otus-small-table",4,"ngIf"],["class","no-data-container",4,"ngIf"],[1,"row"],[1,"small-12","columns"],[1,"error-list","alert","callout"],n,[4,"ngFor","ngForOf"],["id","delete-multiple-attempts-button"],["
24icon","fas fa-trash","buttonText",a,"color","invisible-light",3,"onClick"],[1,"otus-small-table"],[1,"first"],[1,"checkbox-container"],[3,"checked","iconPrefix","onClick"],[1,"attempt-name-container"],c,[1,"second"],S,[1,"third"],I,[1,"fourth"],[1,"tbody-container"],[3,"ngClass","mouseenter","mouseleave",4,"ngFor","ngForOf"],[3,"ngClass","mouseenter","mouseleave"],["class","first",4,"ngIf"],["class","fourth",4,"ngIf"],["placeholder",g,3,"ngModel","required","maxlength","shouldError","ngModelChange","focus","blur","onPressEnter"],["prefix","fas","name","pencil-alt",3,"click"],["prefix","fas","name","trash",3,"click"],[1,"no-data-container"],[1,"content-div"],["name","upload"],["id","bold-text"],B,["id","normal-text"],z]},template:function(t,o){if(1&t){const n=e.EpF();e.TgZ(0,"ot-new-modal",0),e.NdJ("onCloseModal",function(){return o.onCloseModal()}),e.TgZ(1,"div",1)(2,"p"),e.SDv(3,2),e.qZA(),e.TgZ(4,"div",3)(5,"otus-button",4),e.NdJ("onClick",function(){return o.onClickDownloadTemplate()}),e.qZA(),e.TgZ(6,"otus-button",5),e.NdJ("onClick",function(){return e.CHM(n),e.MAs(8).click(),e.KtG(o.clearUploadErrors())}),e.qZA(),e.TgZ(7,"input",6,7),e.NdJ("change",function(c){return o.onFileUpload(c)}),e.qZA()()(),e.YNc(9,Sn,8,1,"div",8),e.TgZ(10,"div",9)(11,"div",10)(12,"p",11),e._uU(13),e.qZA(),e.YNc(14,An,2,0,"div",12),e.qZA(),e.YNc(15,Mn,16,3,"table",13),e.YNc(16,Nn,7,0,"div",14),e.qZA()()}2&t&&(e.xp6(9),e.Q6J("ngIf",o.uploadErrors&&o.uploadErrors.length>0),e.xp6(4),e.Oqu(null==o.assessment?null:o.assessment.assessmentName),e.xp6(1),e.Q6J("ngIf",o.checkboxCount>1),e.xp6(1),e.Q6J("ngIf",o.readyForData&&(null==o.attempts?null:o.attempts.length)>0),e.xp6(1),e.Q6J("ngIf",o.readyForData&&0===(null==o.attempts?null:o.attempts.length)))},dependencies:[N.JJ,N.Q7,N.nD,N.On,pn.R,Se.P,ie.A,j.d,ee.J,l.mk,l.sg,l.O5,ae.a,Xe.X],styles:[".header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;background-color:#fff;justify-content:space-between}.header__title[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.header__buttons[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.header__buttons[hidden][_ngcontent-%COMP%]{display:none!important}"]}),s})();function Pn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"otus-button",26),e.NdJ("onClick",function(){e.CHM(t);const n=e.oxw().$implicit,a=e.oxw(2);return e.KtG(a.onClickEditTargetSets(n))}),e.qZA()}}function bn(s,i){if(1&s){const t=e.EpF();e.TgZ(0,"tr")(1,"td",19),e._uU(2),e.qZA(),e.TgZ(3,"td",20)(4,"otus-button",21),e.NdJ("onClick",function(){const a=e.CHM(t).$implicit,c=e.oxw(2);return e.KtG(c.onClickManageData(a))}),e.qZA(),e.YNc(5,Pn,1,0,"otus-button",22),e.qZA(),e.TgZ(6,"td",23)(7,"button",24),e.NdJ("click",function(){const a=e.CHM(t).$implicit,c=e.oxw(2);return e.KtG(c.selectAssessment(a))}),e._UZ(8,"ot-icon-label",25),e.qZA()()()}if(2&s){const t=i.index,o=e.oxw(2),n=e.MAs(7);e.xp6(2),e.Oqu(o.assessmentNames[t].assessmentName),e.xp6(3),e.Q6J("ngIf",!o.isTabletSize()),e.xp6(2),e.Q6J("ot-menu-trigger",n)}}function yn(s,i){if(1&s&&(e.TgZ(0,"div")(1,"table",16)(2,"thead")(3,"tr")(4,"th"),e.SDv(5,17),e.qZA()()(),e.TgZ(6,"tbody"),e.YNc(7,bn,9,3,"tr",18),e.qZA()()()),2&s){const t=e.oxw();e.xp6(7),e.Q6J("ngForOf",t.assessmentsSorted)}}function vn(s,i){1&s&&(e.TgZ(0,"div",27)(1,"div",28),e._UZ(2,"ot-icon",29),e.TgZ(3,"p",30),e.SDv(4,31),e.qZA(),e.TgZ(5,"p",32),e.SDv(6,33),e.qZA()()())}let xn=(()=>{class s{constructor(t,o,n,a,c,S){this._route=t,this._router=o,this._otherAssessmentService=n,this._alertMessageService=a,this._confirmAlert=c,this._toolboxService=S,this.breadcrumbs=new Array,this.isTabletSize=tn.B6,this.readyForData=!1}ngOnInit(){-1!==window.location.href.indexOf("other-assessment")&&this._toolboxService.setEditingOCA(!0),this.companyId=this._route.snapshot.params.companyId,this.companyId||this._navigateBack(),this.getAssessments(),this.companyName=localStorage.getItem(this._otherAssessmentService.selectedCompanyName),this.breadcrumbs=[{breadCrumbItemId:1,label:"3rd Party"},{breadCrumbItemId:2,label:this.companyName}]}ngOnDestroy(){this._toolboxService.setEditingOCA(!1)}onResize(){this._truncateAssessmentNames(this.assessmentsSorted)}getAssessments(){this.assessments=[],this._otherAssessmentService.getAssessments(this.companyId).subscribe(t=>{t?.success?(this.assessments=(0,d.Deserialize)(t.results,fe.j),this.sortAssessments(this.assessments)):this._alertMessageService.error($localize`:analytics/companyPageComponent|Error message to inform there was an error getting assessments:There was an error getting assessments for this 3rd Party company.`)})}sortAssessments(t){this.assessmentsSorted=t.sort((o,n)=>on.M.alphanumericNatural(o.assessmentName,n.assessmentName)),this._truncateAssessmentNames(this.assessmentsSorted),this.readyForData=!0}_truncateAssessmentNames(t){this.assessmentNames=(0,p.Z)(t),this.assessmentNames.forEac
24h(o=>{o.assessmentName.length>145&&window.innerWidth>=1440?o.assessmentName=o.assessmentName.slice(0,145)+"...":o.assessmentName.length>115&&window.innerWidth<1440&&window.innerWidth>=1200?o.assessmentName=o.assessmentName.slice(0,115)+"...":o.assessmentName.length>75&&window.innerWidth<1200&&window.innerWidth>=992?o.assessmentName=o.assessmentName.slice(0,75)+"...":o.assessmentName.length>40&&window.innerWidth<992&&window.innerWidth>=776?o.assessmentName=o.assessmentName.slice(0,40)+"...":o.assessmentName.length>30&&(o.assessmentName=o.assessmentName.slice(0,30)+"...")})}onSelectBreadcrumb(t){t&&1==t.breadCrumbItemId&&this._navigateBack()}_navigateBack(){this._router.navigate(["analytics","3rdparty"])}onClickNewAssessment(){this.addOtherAssessmentModal.showModal()}onClickManageData(t){this.selectedAssessment=t,this._manageAttemptDataModal.pageFirstLoad=!0,this._manageAttemptDataModal.getAttemptDataForAssessment(this.selectedAssessment)}onClickEditTargetSets(t){this.addOtherAssessmentModal.showModal(t)}selectAssessment(t){this.selectedAssessment=t}getAssessmentToEdit(){this._otherAssessmentService.getAssessmentById(this.selectedAssessment.id).subscribe(t=>{t?.success?(this.selectedAssessment=(0,d.Deserialize)(t.results[0],fe.j),this.addOtherAssessmentModal.editAssessmentDetails(this.selectedAssessment)):this._alertMessageService.error($localize`:analytics/companyPageComponent|Error message to inform that is unable to get assessment to edit:Unable to get assessment to edit at this time.`)})}onEditAssessment(t){const o=(0,P.Z)(this.assessmentsSorted,a=>a.id==t.id),n=this.assessmentsSorted[o];n.assessmentName=t.assessmentName,this._movetoTop(o,n)}_movetoTop(t,o){this.assessmentsSorted.splice(t,1),this.assessmentsSorted.unshift(o),this._truncateAssessmentNames(this.assessmentsSorted)}deleteAssessment(){this._confirmAlert.showYesOrNoDialog($localize`:analytics/companyPageComponent|Delete this 3rd Party Assessment question:Are you sure you want to delete this 3rd Party assessment?`,()=>{this._otherAssessmentService.deleteAssessment(this.selectedAssessment.id).subscribe(t=>{t?.success?this.getAssessments():this._alertMessageService.error($localize`:analytics/companyPageComponent|Error message to inform that is unable to delete this 3rd party assessment:Unable to delete this 3rd party assessment at this time.`)})})}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(v.gz),e.Y36(v.F0),e.Y36(Oe.z),e.Y36(f.Of),e.Y36(Le.Q),e.Y36(Y.l))},s.\u0275cmp=e.Xpm({type:s,selectors:[["company-page"]],viewQuery:function(t,o){if(1&t&&(e.Gf(te.L,5),e.Gf(nt,5),e.Gf(ot,5)),2&t){let n;e.iGM(n=e.CRH())&&(o.breadcrumbComponent=n.first),e.iGM(n=e.CRH())&&(o._manageAttemptDataModal=n.first),e.iGM(n=e.CRH())&&(o.addOtherAssessmentModal=n.first)}},decls:20,vars:5,consts:function(){let i,t,o,n,a,c,S,I;return i=$localize`:analytics/companyPageComponent|Text New Assessment to button␟a9d8d8a092f46af8063fc1ad741b5f8efdd5c1ca␟9364199165460224:New Assessment`,t=$localize`:analytics/companyPageComponent|Text Edit to menu option label␟c0b23eebf985a3570229999cd9dfb18c59d0a330␟5073604273066619877:Edit`,o=$localize`:analytics/companyPageComponent|Text Delete to menu option label␟bc636ab5683c8ba89c7f8544a9bdde42390ffb34␟3946092212100011303:Delete`,n=$localize`:analytics/companyPageComponent|Text Assessment Name to table header␟ed91e89cd75517b46ba9fcd9e23aa487198130c8␟5858741161200364655: Assessment Name `,a=$localize`:analytics/companyPageComponent|Text Manage Data to button inside table␟33cff9a52bd18af2728f37dcbfeb978e756c10c1␟1814786109962838198:Manage Data`,c=$localize`:analytics/companyPageComponent|Text dit Target Sets to button inside table␟dad1f2320c541f9804cd41e9792f4e62935e2991␟1414796752242621629:Edit Target Sets`,S=$localize`:analytics/companyPageComponent|Text to inform that it's time to add first assessment␟79e9f884242dff7e82a8836102a3b2a948fcc84e␟2510811125331945685: It’s time to add your first assessment. `,I=$localize`:analytics/companyPageComponent|Text to inform that clicking above the user will add new
25          assessment␟e1f5de2a1b3a99926f35b32a6dbb167eda85af59␟7966356067630921736: Click the Add New Assessment button above to add your first assessment and target set to this company. `,[[1,"header",3,"resize"],[3,"items","onSelectItem"],["buttonText",i,"icon","fas fa-plus","color","dark",3,"onClick"],[1,"body"],[4,"ngIf"],["class","no-data-container",4,"ngIf"],["assessmentMenu",""],["ot-option","","role","menuitem",3,"click"],["slot","before-label"],["type","edit"],["slot","label"],t,["type","delete"],o,[3,"assessment"],[3,"companyId","onEditAssessment","refreshAssessmentList"],[1,"otus-large-table"],n,[4,"ngFor","ngForOf"],[1,"first"],[1,"second"],["buttonText",a,"icon","fa fa-cog","color","dark",3,"onClick"],["buttonText",c,"icon","fa fa-cog","color","dark",3,"onClick",4,"ngIf"],[1,"third"],["ot-button","","trim","true","aria-label","open actions menu","color","transparent","size","small","display","block",3,"ot-menu-trigger","click"],["type","actions"],["buttonText",c,"icon","fa fa-cog","color","dark",3,"onClick"],[1,"n
25o-data-container"],[1,"content-div"],["name",">upload"],["id","bold-text"],S,["id","normal-text"],I]},template:function(t,o){if(1&t){const n=e.EpF();e.TgZ(0,"div",0),e.NdJ("resize",function(){return o.onResize()},!1,e.Jf7),e.TgZ(1,"breadcrumb",1),e.NdJ("onSelectItem",function(c){return o.onSelectBreadcrumb(c)}),e.qZA(),e.TgZ(2,"otus-button",2),e.NdJ("onClick",function(){return o.onClickNewAssessment()}),e.qZA()(),e.TgZ(3,"div",3),e.YNc(4,yn,8,1,"div",4),e.YNc(5,vn,7,0,"div",5),e.qZA(),e.TgZ(6,"ot-menu",null,6)(8,"li",7),e.NdJ("click",function(){e.CHM(n);const c=e.MAs(7);return o.getAssessmentToEdit(),e.KtG(c.hide())}),e.ynx(9,8),e._UZ(10,"ot-icon-label",9),e.BQk(),e.ynx(11,10),e.SDv(12,11),e.BQk(),e.qZA(),e.TgZ(13,"li",7),e.NdJ("click",function(){e.CHM(n);const c=e.MAs(7);return o.deleteAssessment(),e.KtG(c.hide())}),e.ynx(14,8),e._UZ(15,"ot-icon-label",12),e.BQk(),e.ynx(16,10),e.SDv(17,13),e.BQk(),e.qZA()(),e._UZ(18,"manage-attempt-data-modal",14),e.TgZ(19,"add-other-assessment-modal",15),e.NdJ("onEditAssessment",function(c){return o.onEditAssessment(c)})("refreshAssessmentList",function(){return o.getAssessments()}),e.qZA()}2&t&&(e.xp6(1),e.Q6J("items",o.breadcrumbs),e.xp6(3),e.Q6J("ngIf",o.readyForData&&(null==o.assessments?null:o.assessments.length)>0),e.xp6(1),e.Q6J("ngIf",o.readyForData&&0==(null==o.assessments?null:o.assessments.length)),e.xp6(13),e.Q6J("assessment",o.selectedAssessment),e.xp6(1),e.Q6J("companyId",o.companyId))},dependencies:[Ce.zx,ie.A,te.L,ee.J,me.g,qe.v,je.b,et.Wx,l.sg,l.O5,ot,nt],styles:[".header[_ngcontent-%COMP%]{height:100px;display:flex;align-items:center;background-color:#fff;justify-content:space-between}.header__title[_ngcontent-%COMP%]{display:flex;justify-content:flex-start}.header__buttons[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end}.header__buttons[hidden][_ngcontent-%COMP%]{display:none!important}"]}),s})(),wn=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[l.ez]}),s})();var Ln=r(71563),Rn=r(70761);const st=[{path:"",component:qo,children:[{path:"",component:Ko},{path:"other-assessment/:companyId",component:xn}]}];let at=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[v.Bz.forChild(st),v.Bz]}),s})(),In=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[at,N.u5,N.UX,G.sF.withComponents([]),H.h,R.z,x.g,O.U$,u.I,T.u3,w.p,$e.o,ce._,Re.z,ie.q,j.g,Ne.p,Ie.NA,J.D,le.c,Ee.J,De.G,Ue.x,_e.R,Fe.p,te.w,Me.O,Ln.E,$.QX,m.IT,L.$9,C.wD,_.uv,Pe.VI,Z.n,l.ez,ae.Y,wn,en.f,jo._,Rn.s,A.D]}),s})()},70761:(V,k,r)=>{r.d(k,{s:()=>T});var l=r(36895),N=r(62039),v=r(60539),H=r(6734),Z=r(79997),x=r(81120),$=r(25546),m=r(81586),w=r(3665),L=r(56478),C=r(94650);let T=(()=>{class u{}return u.\u0275fac=function(R){return new(R||u)},u.\u0275mod=C.oAB({type:u}),u.\u0275inj=C.cJS({imports:[l.ez,$.x,N.QX,v.IT,H.z,m.NA,Z.U$,x.u3,w.z,L.c]}),u})()},69502:(V,k,r)=>{r.d(k,{L:()=>w,w:()=>L});var l=r(94650),N=r(36895),v=r(65501);function H(C,T){1&C&&(l.TgZ(0,"span",6),l._uU(1,"/"),l.qZA())}function Z(C,T){if(1&C){const u=l.EpF();l.TgZ(0,"i",7),l.NdJ("click",function(R){l.CHM(u);const G=l.oxw().$implicit;return l.oxw().onClickOption(G),l.KtG(R.stopPropagation())}),l.qZA()}if(2&C){const u=l.oxw(2);l.Gre("has-icon ",u.icon,"")}}const x=function(C){return{"is-not-clickable":C}},$=function(C){return{"bold-text":C}};function m(C,T){if(1&C){const u=l.EpF();l.TgZ(0,"li",2),l.YNc(1,H,2,0,"span",3),l.YNc(2,Z,1,3,"i",4),l.TgZ(3,"a",5),l.NdJ("click",function(R){const te=l.CHM(u).$implicit;return l.oxw().onClickOption(te),l.KtG(R.stopPropagation())}),l._uU(4),l.qZA()()}if(2&C){const u=T.$implicit,O=T.index,R=l.oxw();l.Q6J("ngClass",l.VKq(5,x,!1===u.clickable)),l.xp6(1),l.Q6J("ngIf",O>0),l.xp6(1),l.Q6J("ngIf",u.hasIcon),l.xp6(1),l.Q6J("ngClass",l.VKq(7,$,R.boldText)),l.xp6(1),l.hij("",u.label," ")}}let w=(()=>{class C{constructor(){this.size="large",this.boldText=!0,this.itemsChange=new l.vpe,this.onSelectItem=new l.vpe}onClickOption(u){if(!u.hasOwnProperty("clickable")||u.clickable){u.clickable=!0;const O=this.items.indexOf(u);this.items=this.items.slice(0,O+1),this.itemsChange.emit(this.items),this.onSelectItem.emit(u)}}}return C.\u0275fac=function(u){return new(u||C)},C.\u0275cmp=l.Xpm({type:C,selectors:[["breadcrumb"]],inputs:{items:"items",size:"size",icon:"icon",boldText:"boldText"},outputs:{itemsChange:"itemsChange",onSelectItem:"onSelectItem"},decls:3,vars:4,consts:[[1,"breadcrumb"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],["class","breadcrumb-item__spacer",4,"ngIf"],[3,"class","click",4,"ngIf"],[3,"ngClass","click"],[1,"breadcrumb-item__spacer"],[3,"click"]],template:function(u,O){1&u&&(l.TgZ(0,"div")(1,"ul",0),l.YNc(2,m,5,9,"li",1),l.qZA()()),2&u&&(l.Gre("breadcrumb-component ",O.size,""),l.xp6(2),l.Q6J("ngForOf",O.items))},dependencies:[N.mk,N.sg,N.O5],encapsulation:2}),C})(),L=(()=>{class C{}return C.\u0275fac=function(u){return new(u||C)},C.\u0275mod=l.oAB({type:C}),C.\u0275inj=l.cJS({imports:[N.ez,v.D]}),C})()},67348:(V,k,r)=>{r.d(k,{J:()=>$});
25var l=r(36895),N=r(24006),v=r(19328),H=r(35661),Z=r(18860),x=r(94650);let $=(()=>{class m{}return m.\u0275fac=function(L){return new(L||m)},m.\u0275mod=x.oAB({type:m}),m.\u0275inj=x.cJS({imports:[l.ez,N.u5,v.O,Z.Z_,H.C8]}),m})()},32266:(V,k,r)=>{r.d(k,{Y:()=>$,a:()=>x});var l=r(94650),N=r(36895);function v(m,w){1&m&&(l.TgZ(0,"div",3),l._UZ(1,"i",4),l.qZA())}function H(m,w){if(1&m&&(l.TgZ(0,"div",3),l._UZ(1,"i"),l.qZA()),2&m){const L=l.oxw();l.xp6(1),l.Gre("",L.iconPrefix," fa-check-square")}}function Z(m,w){if(1&m&&(l.TgZ(0,"div",5)(1,"p"),l._uU(2),l.qZA()()),2&m){const L=l.oxw();l.xp6(2),l.Oqu(L.label)}}let x=(()=>{class m{constructor(){this.checked=!1,this.color="light",this.iconPrefix="far",this.onClick=new l.vpe,this.isActive=!0}checkBoxClicked(L){this.isActive&&(this.onClick.emit(L),L.stopPropagation())}}return m.\u0275fac=function(L){return new(L||m)},m.\u0275cmp=l.Xpm({type:m,selectors:[["font-awesome-checkbox"]],inputs:{checked:"checked",label:"label",color:"color",iconPrefix:"iconPrefix",darkBackground:"darkBackground",isActive:"isActive"},outputs:{onClick:"onClick"},decls:4,vars:6,consts:[[3,"click"],["class","checkbox-div",4,"ngIf"],["class","checkbox-label",4,"ngIf"],[1,"checkbox-div"],[1,"far","fa-square"],[1,"checkbox-label"]],template:function(L,C){1&L&&(l.TgZ(0,"div",0),l.NdJ("click",function(u){return C.checkBoxClicked(u)}),l.YNc(1,v,2,0,"div",1),l.YNc(2,H,2,3,"div",1),l.YNc(3,Z,3,1,"div",2),l.qZA()),2&L&&(l.Gre("font-awesome-checkbox-component ",C.color,""),l.xp6(1),l.Q6J("ngIf",!C.checked),l.xp6(1),l.Q6J("ngIf",C.checked),l.xp6(1),l.Q6J("ngIf",C.label))},dependencies:[N.O5],styles:["[_nghost-%COMP%]{font-size:var(--ot-font-size-m);font-weight:var(--ot-font-weight-400);font-style:normal;font-stretch:normal;line-height:var(--ot-line-height-normal);letter-spacing:var(--ot-letter-spacing-normal);display:inline-block}.fas.fa-check-square[_ngcontent-%COMP%], .gray[_ngcontent-%COMP%]   .fa-check-square[_ngcontent-%COMP%]{color:var(--ot-color-primary-900)}.far.fa-check-square[_ngcontent-%COMP%], .light[_ngcontent-%COMP%]{color:var(--ot-color-white)}.gray[_ngcontent-%COMP%]   .fa-square[_ngcontent-%COMP%]{color:var(--ot-color-neutral-300)}"]}),m})(),$=(()=>{class m{}return m.\u0275fac=function(L){return new(L||m)},m.\u0275mod=l.oAB({type:m}),m.\u0275inj=l.cJS({imports:[N.ez]}),m})()},12817:(V,k,r)=>{r.d(k,{L:()=>L,k:()=>C});var l=r(94650),N=r(81854),v=r(36895),H=r(93910);function Z(T,u){if(1&T&&(l.TgZ(0,"span",8),l._uU(1),l.qZA()),2&T){const O=l.oxw();l.xp6(1),l.Oqu(O.title)}}function x(T,u){if(1&T){const O=l.EpF();l.TgZ(0,"div")(1,"i",9),l.NdJ("click",function(){l.CHM(O);const G=l.oxw();return l.KtG(G.onClickPrev())}),l.qZA()()}if(2&T){const O=l.oxw();l.Gre("otus-new-modal__arrows arrow-left ",O.size,""),l.ekj("inactive",!O.isArrowEnabled(0))}}function $(T,u){if(1&T){const O=l.EpF();l.TgZ(0,"div")(1,"i",10),l.NdJ("click",function(){l.CHM(O);const G=l.oxw();return l.KtG(G.onClickNext())}),l.qZA()()}if(2&T){const O=l.oxw();l.Gre("otus-new-modal__arrows arrow-right ",O.size,""),l.ekj("inactive",!O.isArrowEnabled(1)||O.shouldBlockForward)}}function m(T,u){if(1&T&&(l.TgZ(0,"div",11),l._UZ(1,"ot-progress-bar",12),l.qZA()),2&T){const O=l.oxw();l.xp6(1),l.Q6J("totalSteps",O.totalSteps)("currentStep",O.currentStep)}}const w=["*"];var L=(()=>{return(T=L||(L={}))[T.Forward=0]="Forward",T[T.Backward=1]="Backward",L;var T})();let C=(()=>{class T extends N.P{constructor(O,R){super(O,R),this._elementRef=O,this._r=R,this.totalSteps=0,this.currentStep=0,this.minStep=0,this.enableArrows=!0,this.closeAtLastStep=!1,this.showProgress=!0,this.shouldBlockForwardWhenCantShowNextStep=!1,this.showForwardOnLastStep=!0,this.canShowNextStep=()=>!0,this.onChangeStep=new l.vpe}get shouldBlockForward(){return!!this.shouldBlockForwardWhenCantShowNextStep&&!this.canShowNextStep()}onClickPrev(){this.isArrowEnabled(0)&&this.currentStep>0&&(this.currentStep--,this.onChangeStep.emit({step:this.currentStep,direction:L.Backward}))}onClickNext(){if(this.isArrowEnabled(1)){if(this.closeAtLastStep&&this.currentStep==this.totalSteps)return void this.closeModal();this.canShowNextStep()&&this.currentStep<this.totalSteps&&(this.currentStep++,this.onChangeStep.emit
25({step:this.currentStep,direction:L.Forward}))}}isArrowEnabled(O){if(!this.enableArrows)return!1;if(0==O){let R=0;return this.minStep>0&&(R=this.minStep),this.currentStep>R}return 1==O?!(!this.closeAtLastStep||this.currentStep!=this.totalSteps)||this.currentStep<this.totalSteps:void 0}showForward(){return!(this.currentStep==this.totalSteps&&!this.showForwardOnLastStep)}}return T.\u0275fac=function(O){return new(O||T)(l.Y36(l.SBq),l.Y36(l.Qsj))},T.\u0275cmp=l.Xpm({type:T,selectors:[["ot-steps-modal"]],inputs:{totalSteps:"totalSteps",currentStep:"currentStep",minStep:"minStep",enableArrows:"enableArrows",closeAtLastStep:"closeAtLastStep",showProgress:"showProgress",shouldBlockForwardWhenCantShowNextStep:"shouldBlockForwardWhenCantShowNextStep",showForwardOnLastStep:"showForwardOnLastStep",canShowNextStep:"canShowNextStep"},outputs:{onChangeStep:"onChangeStep"},features:[l.qOj],ngContentSelectors:w,decls:11,vars:12,consts:[["data-reveal","","data-options","close_on_background_click:true; close_on_esc:true;"],[1,"otus-new-modal__close-button"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 20 20",3,"click"],["fill-rule","evenodd","d","M17.522 0L10 7.522 2.478 0 0 2.478 7.522 10 0 17.522 2.478 20 10 12.478 17.522 20 20 17.522 12.478 10 20 2.478z",1,"close-button-path"],[1,"otus-new-modal__title"],["class","truncate",4,"ngIf"],[3,"class","inactive",4,"ngIf"],["class","row","style","margin-top: -10px;",4,"ngIf"],[1,"truncate"],["aria-hidden","true",1,"fa","fa-angle-left",3,"click"],["aria-hidden","true",1,"fa","fa-angle-right",3,"click"],[1,"row",2,"margin-top","-10px"],["width","414px",3,"totalSteps","currentStep"]],template:function(O,R){1&O&&(l.F$t(),l.TgZ(0,"div",0)(1,"div",1),l.O4$(),l.TgZ(2,"svg",2),l.NdJ("click",function(){return R.closeModal()}),l._UZ(3,"path",3),l.qZA()(),l.kcU(),l.TgZ(4,"div",4),l.YNc(5,Z,2,1,"span",5),l.qZA(),l.TgZ(6,"div"),l.Hsn(7),l.qZA(),l.YNc(8,x,2,5,"div",6),l.YNc(9,$,2,5,"div",6),l.YNc(10,m,2,2,"div",7),l.qZA()),2&O&&(l.Gre("reveal otus-new-modal ",R.size,""),l.Udp("overflow",R.overflowModal),l.xp6(5),l.Q6J("ngIf",null!=R.title),l.xp6(1),l.Gre("otus-new-modal__wrapper ",R.size,""),l.xp6(2),l.Q6J("ngIf",R.currentStep!==R.minStep),l.xp6(1),l.Q6J("ngIf",R.showForward()),l.xp6(1),l.Q6J("ngIf",R.showProgress))},dependencies:[v.O5,H.R],encapsulation:2}),T})()},93910:(V,k,r)=>{r.d(k,{R:()=>Z});var l=r(94650),N=r(36895);const v=function(x,$,m){return{selected:x,"should-show-lines":$,"small-size":m}};function H(x,$){if(1&x){const m=l.EpF();l.TgZ(0,"div",3),l.NdJ("click",function(){const C=l.CHM(m).$implicit,T=l.oxw();return l.KtG(T.onClickStep(C))}),l.qZA()}if(2&x){const m=$.$implicit,w=l.oxw();l.Udp("width",w.getStepWidth()),l.Q6J("ngClass",l.kEZ(3,v,m<=w.currentStep,w.shouldShowLines,"small"===w.size))}}let Z=(()=>{class x{constructor(){this.totalSteps=1,this.currentStep=0,this.width="inherit",this.shouldShowLines=!0,this.size="default",this.step=new l.vpe}getSteps(){const m=[];for(let w=1;w<=this.totalSteps;w++)m.push(w);return m}getStepWidth(){return Math.floor(100/this.totalSteps*100)/100+"%"}onClickStep(m){this.step.emit(m)}}return x.\u0275fac=function(m){return new(m||x)},x.\u0275cmp=l.Xpm({type:x,selectors:[["ot-progress-bar"]],inputs:{totalSteps:"totalSteps",currentStep:"currentStep",width:"width",shouldShowLines:"shouldShowLines",size:"size"},outputs:{step:"step"},decls:3,vars:3,consts:[[1,"progress-bar"],[1,"progress-bar__wrapper"],["class","progress-bar__step",3,"width","ngClass","click",4,"ngFor","ngForOf"],[1,"progress-bar__step",3,"ngClass","click"]],template:function(m,w){1&m&&(l.TgZ(0,"div",0)(1,"div",1),l.YNc(2,H,1,7,"div",2),l.qZA()()),2&m&&(l.xp6(1),l.Udp("width",w.width),l.xp6(1),l.Q6J("ngForOf",w.getSteps()))},dependencies:[N.mk,N.sg],styles:[".progress-bar[_ngcontent-%COMP%]{text-align:center}.progress-bar__wrapper[_ngcontent-%COMP%]{margin:0 auto}.progress-bar__step[_ngcontent-%COMP%]{display:inline-block;height:20px}.progress-bar__step.should-show-lines[_ngcontent-%COMP%]{background-color:#eaeaea;border-right:solid 1px #dddddd}.progress-bar__step[_ngcontent-%COMP%]:not(.should-show-lines){background-color:var(--ot-color-neutral-400)}.progress-bar__step.small-size[_ngcontent-%COMP%]{height:.9375rem}.progress-bar__step.selected[_ngcontent-%COMP%]{background-color:var(--ot-color-primary-900);border-right:solid 1px var(--ot-color-primary-900)}.progress-bar__step[_ngcontent-%COMP%]:first-child{border-top-left-radius:20px;border-bottom-left-radius:20px}.progress-bar__step[_ngcontent-%COMP%]:last-child{border-top-right-radius:20px;border-bottom-right-radius:20px;border-right:none}.progress-bar__step[_ngcontent-%COMP%]:last-child.selected{border-right:none}"]}),x})()},75628:(V,k,r)=>{r.d(k,{q:()=>N});var l=r(94650);let N=(()=>{class v{transform(Z,x){x=x||60;let $=Z;return Z&&Z.length>x&&($=Z.substr(0,x)+"\u2026"),$}}return v.\u0275fac=function(Z){return new(Z||v)},v.\u0275pipe=l.Yjl({name:"truncateText",type:v,pure:!0}),v})()},52894:(V,k,r)=>{r.d(k,{B6:()=>N,Du:()=>$,Kt:()=>v,Mq:()=>l,Qm:()=>Z,qe:()=>x,xj:()=>H});const l=()=>window.innerWidth<992,N=()=>window.innerWidth<992,v=()=>window.innerWidth<1200,H=()=>window.innerWidth<1440,Z=()=>window.innerWidth>1440,x=()=>Boolean(navigator.mediaDevices)&&Boolean(navigator.mediaDevices.getUserMedia),$=()=>typeof MediaRecorder<"u"},75797:(V,k,r)=>{r.d(k,{k:()=>N});const{isArray:l}=Array;function N(v){return 1===v.length&&l(v[0])?v[0]:v}}}]);

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.