"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[39348],{39348:(e,n,r)=>{r.r(n),r.d(n,{AddonModWorkshopAssessmentStrategyRubricHandler:()=>a,AddonModWorkshopAssessmentStrategyRubricHandlerLazyService:()=>i});var s=r(10467),o=r(79555),t=r(98457),d=r(54438);let i=(()=>{var e;class AddonModWorkshopAssessmentStrategyRubricHandlerLazyService extends t.V{getComponent(){return(0,s.A)((function*(){const{AddonModWorkshopAssessmentStrategyRubricComponent:e}=yield Promise.all([r.e(72076),r.e(6871)]).then(r.bind(r,6871));return e}))()}getOriginalValues(e){return(0,s.A)((function*(){const n=[];return e.fields.forEach(((r,s)=>{r.dimtitle=o.HT.instant("addon.mod_workshop_assessment_rubric.dimensionnumber",{$a:r.number}),e.current[s]||(e.current[s]={}),n[s]={},n[s].chosenlevelid=e.current[s].chosenlevelid||"",n[s].number=r.number})),n}))()}hasDataChanged(e,n){for(const r in e)if(e[r].chosenlevelid!=(n[r].chosenlevelid||""))return!0;return!1}prepareAssessmentData(e,n){return(0,s.A)((function*(){const r={},s={};let t=!1;if(n.fields.forEach(((d,i)=>{if(i<n.dimenssionscount){const a=parseInt(e[i].chosenlevelid,10);!isNaN(a)&&a>=0?r[`chosenlevelid__idx_${i}`]=a:(s[`chosenlevelid_${i}`]=o.HT.instant("addon.mod_workshop_assessment_rubric.mustchooseone"),t=!0),r[`gradeid__idx_${i}`]=parseInt(n.current[i].gradeid,10)||0,r[`dimensionid__idx_${i}`]=parseInt(d.dimensionid,10)}})),t)throw s;return r}))()}}return(e=AddonModWorkshopAssessmentStrategyRubricHandlerLazyService).ɵfac=(()=>{let n;return function AddonModWorkshopAssessmentStrategyRubricHandlerLazyService_Factory(r){return(n||(n=d.xGo(e)))(r||e)}})(),e.ɵprov=d.jDH({token:e,factory:e.ɵfac,providedIn:"root"}),AddonModWorkshopAssessmentStrategyRubricHandlerLazyService})();const a=(0,o.Qd)(i)}}]);