PageSourceSearch

https://teachers.teeread.com/static/js/1.0460b3b5.chunk.js

js teeread.com collected 2026-10-03 19:49:20 UTC 17,766 bytes, 3 lines download raw bytes

vendor: 4,344 bytes, lines 1-2
1/*! For license information please see 1.0460b3b5.chunk.js.LICENSE.txt */
2(this["webpackJsonpteeread-teachers-web"]=this["webpackJsonpteeread-teachers-web"]||[]).push([[1],{609:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(18),o=n(10),i=n(11),a=n(608),s=n(138),u=n(12),c=n(13),l=n(0),d=n.n(l),f=n(612),v=n(39),m=n(67),h=n(66),p=n(87);function b(){b=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(P){u=function(t,e,n){return t[e]=n}}function c(t,e,n,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),s=new L(o||[]);return r(a,"_invoke",{value:O(t,n,s)}),a}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(P){return{type:"throw",arg:P}}}t.wrap=c;var d={};function f(){}function v(){}function m(){}var h={};u(h,i,(function(){return this}));var p=Object.getPrototypeOf,g=p&&p(p(N([])));g&&g!==e&&n.call(g,i)&&(h=g);var y=m.prototype=f.prototype=Object.create(h);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var o;r(this,"_invoke",{value:function(r,i){function a(){return new e((function(o,a){!function r(o,i,a,s){var u=l(t[o],t,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(r,i,o,a)}))}return o=o?o.then(a,a):a()}})}function O(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return E()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=j(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function j(t,e){var n=e.method,r=t.iterator[n];if(void 0===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=l(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function N(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:E}}function E(){return{value:void 0,done:!0}}return v.prototype=m,r(y,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:v,configurable:!0}),v.displayName=u(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,u(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},_(w.prototype),u(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
2ise);var a=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(y),u(y,s,"Generator"),u(y,i,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=N,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:N(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}var g=function(t){Object(u.a)(n,t);var e=Object(c.a)(n);function n(t){var r,i;if(Object(o.a)(this,n),(r=e.call(this,t)).userTR=Object(v.c)(),r.userTR)if(r.user=JSON.parse(r.userTR).user,void 0===(null===(i=r.user)||void 0===i?void 0:i.class)&&"/"!==h.a.location.pathname&&"/success"!==h.a.location.pathname)h.a.push("/");else try{var a,s,u;"M"!==(null===(a=r.user)||void 0===a?void 0:a.gender)&&"F"!==(null===(s=r.user)||void 0===s?void 0:s.gender)&&"X"!==(null===(u=r.user)||void 0===u?void 0:u.gender)&&Object(v.i)()}catch(c){Object(v.f)()}else Object(v.f)();return r}return Object(i.a)(n,[{key:"componentDidMount",value:function(){var t=Object(r.a)(b().mark((function t(){var e,r=this;return b().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(a.a)(Object(s.a)(n.prototype),"componentDidMount",this).call(this);case 2:return t.next=4,Object(p.b)();case 4:e=t.sent,Object(v.j)(e,(function(){var t,n,o,i;Object(v.g)(null===(t=r.user)||void 0===t||null===(n=t.class)||void 0===n?void 0:n.id),r.setState({classes:e,activeClass:null===(o=r.user)||void 0===o||null===(i=o.class)||void 0===i?void 0:i.id})}));case 6:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"updateContextUser",value:function(t){var e=JSON.parse(this.userTR);e.user=t,this.userTR=JSON.stringify(e),this.user=t}},{key:"renderModals",value:function(){var t=this,e=Object(a.a)(Object(s.a)(n.prototype),"renderModals",this).call(this);return e.push(d.a.createElement(m.B,{key:"settings",userTR:this.userTR,visible:this.state.settingsModalVisible,closeSettings:function(){return t.setState({settingsModalVisible:!1})}})),e}}]),n}(f.a)},621:function(t,e,n){"use strict";n.d(e,"l",(function(){return f})),n.d(e,"n",(function(){return v})),n.d(e,"b",(function(){return m})),n.d(e,"e",(function(){return h})),n.d(e,"h",(function(){return p})),n.d(e,"f",(function(){return b})),n.d(e,"i",(function(){return g})),n.d(e,"m",(function(){return y}
2)),n.d(e,"a",(function(){return _})),n.d(e,"g",(function(){return w})),n.d(e,"j",(function(){return O})),n.d(e,"k",(function(){return j})),n.d(e,"d",(function(){return x})),n.d(e,"c",(function(){return k}));var r=n(9),o=n(175);function i(t){return t&&t.length>0?t.map((function(t){var e,n;return{id:t._id,name:t.name?t.name.charAt(0).toUpperCase()+t.name.slice(1):"",grade:{name:null===(e=t.grade)||void 0===e?void 0:e.name,order:null===(n=t.grade)||void 0===n?void 0:n.order},parsedName:t.parsed_name,keyWords:t.key_words&&t.key_words.length>0?t.key_words.map((function(t){return{word:t.name,parsedWord:t.parsed_name,definition:t.definition,sentence:t.sentence,sessionGroup:t.key_word_session,exerciseType:t.exercise_type,options:t.options,correct:t.correct}})):[]}})):[]}function a(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?u(t):s(t)}function s(t){return t.map((function(t){var e,n,o,i,a,s=t.event.date,u={};t.data.forEach((function(e){e.lessons.forEach((function(n){var o={};o[e.session_number]={studentId:n.student_id,studentName:n.firstname+(n.lastname?" "+n.lastname:""),lessonId:n._id,lessonGroupToken:n.lesson_group_token,eventId:t.event.event_id,sessionNumber:e.session_number,student:{id:n.student_id}};var i={};i[n.student_id]=Object(r.a)(Object(r.a)({},u[n.student_id]),o),u=Object(r.a)(Object(r.a)({},u),i)}))}));var c=(Object.keys(u)||[]).map((function(t){return Object.keys(u[t]).map((function(e){return u[t][e]}))}));return{date:s,subunit:{id:t.subunit.subunit__id,name:t.subunit.subunit_name,parsedName:t.subunit.subunit_parsed_name},eventId:t.event.event_id,deadline:t.event.deadline,assignedBy:(null===(e=t.event)||void 0===e||null===(n=e.assigned_by)||void 0===n?void 0:n.firstname)?(null===(o=t.event)||void 0===o?void 0:o.assigned_by.firstname)+((null===(i=t.event)||void 0===i?void 0:i.assigned_by.lastname)?" "+(null===(a=t.event)||void 0===a?void 0:a.assigned_by.lastname):""):"",students:u,parsedStudents:c,events:t.data.map((function(t){return{sessionNumber:t.session_number,lessonWords:t.lesson_data.key_words.map((function(t){return"blank"===t.exercise_type?t.options[t.correct].option.toLowerCase():t.name}))}}))}}))}function u(t){return t.map((function(t){var e=t.date;return Object.keys(t.events).map((function(n){var r,o,i,a=t.events[n];return{date:e,subunit:{id:null===(r=a[0].lessons[0].subunit)||void 0===r?void 0:r._id,name:null===(o=a[0].lessons[0].subunit)||void 0===o?void 0:o.name,parsedName:null===(i=a[0].lessons[0].subunit)||void 0===i?void 0:i.parsed_name},sessionNumber:a[0].grammar_session_number,events:a.map((function(t){var e,n,r,o,i,a,s,u,c,l,d,f,v,m,h,p;return{eventId:null===t||void 0===t?void 0:t._id,lessonId:null===(e=t.lessons[0])||void 0===e?void 0:e._id,lessonWords:null===(n=t.lessons[0])||void 0===n?void 0:n.key_words.map((function(t){return"blank"===t.exercise_type?t.options[t.correct].option.toLowerCase():t.name})),lessonGroupToken:null===(r=t.lessons[0])||void 0===r?void 0:r.group_token,lessonCompletedAt:null===(o=t.lessons[0])||void 0===o?void 0:o.session_completed_at,student:{id:null===(i=t.lessons[0])||void 0===i||null===(a=i.student)||void 0===a?void 0:a._id,name:(null===(s=t.lessons[0])||void 0===s||null===(u=s.student)||void 0===u?void 0:u.firstname)+((null===(c=t.lessons[0])||void 0===c||null===(l=c.student)||void 0===l?void 0:l.lastname)?" "+(null===(d=t.lessons[0])||void 0===d||null===(f=d.student)||void 0===f?void 0:f.lastname):""),firstname:null===(v=t.lessons[0])||void 0===v||null===(m=v.student)||void 0===m?void 0:m.firstname,lastname:null===(h=t.lessons[0])||void 0===h||null===(p=h.student)||void 0===p?void 0:p.lastname}}}))}}))})).flat(1)}function c(t){return t&&t.length>0?t.map((function(t){var e,n,r;return{subunitName:null===(e=t.grammar_subunit)||void 0===e?void 0:e.name,isAllSubunit:t.grammar_is_all_subunit,sessionsPending:((null===(n=t.grammar_subunit)||void 0===n?void 0:n.tot_sessions)||0)-((null===(r=t.lessons)||void 0===r?void 0:r.length)||0),deadline:t.deadline,lessons:t.lessons&&t.lessons.length>0?t.lessons.map((function(t){return{sessionNumber:t.session_number,completedAt:t.session_completed_at}})):[]}})):[]}var l=n(16),d=n(17),f=function(){return new Promise((function(t,e){l.a.get("/grammar/get-units").then((function(e){var n;t((n=e,{grades:Object(o.a)(null===n||void 0===n?void 0:n.grades),units:(null===n||void 0===n?void 0:n.units)&&n.units.length>0?n.units.map((function(t){return{name:t.unit_name?t.unit_name.charAt(0).toUpperCase()+t.unit_name.slice(1):"",parsedName:t.unit_parsed_name,subunits:t.values&&t.values.length>0?t.values.map((function(t){return{subunitId:t.unit_id,gradeId:t.grade_id}})):[]}})):[]}))})).catch((function(t){!Object(d.a)(t)&&e(t)}))}
2))},v=function(t){return new Promise((function(e,n){var r={units_ids:t};l.a.post("/grammar/get-subunits-by-units",r).then((function(t){e(i(t))})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))},m=function(t,e,n,r,o,a,s,u){return new Promise((function(c,f){var v={class_id:t,subunit_id:e,is_all_subunit:n,session_number:r,date:o,deadline:a,students:s,full_class:u};l.a.post("/grammar/create-grammar-lesson",v).then((function(t){c(i(t))})).catch((function(t){!Object(d.a)(t)&&f(t)}))}))},h=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((function(n,r){l.a.get("/grammar/sessions-by-class/".concat(t,"/").concat(e)).then((function(t){n(a(t,e))})).catch((function(t){!Object(d.a)(t)&&r(t)}))}))},p=function(t,e){return new Promise((function(n,r){l.a.get("/grammar/student-session-accuracy/".concat(t,"/").concat(e)).then((function(t){var e;n({lessonId:null===(e=t)||void 0===e?void 0:e.grammar_lesson_id,sessionCompleted:null===e||void 0===e?void 0:e.session_completed,accuracyRate:null===e||void 0===e?void 0:e.tot_accuracy_rate})})).catch((function(t){!Object(d.a)(t)&&r(t)}))}))},b=function(t){return new Promise((function(e,n){l.a.get("/app-student/vocabulary/images/".concat(t)).then((function(t){e(function(t){var e;return null===(e=t[0])||void 0===e?void 0:e.url}(t))})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))},g=function(t,e){return new Promise((function(n,r){l.a.get("/grammar/student-tot-sessions-accuracy/".concat(t,"/").concat(e)).then((function(t){n(t)})).catch((function(t){!Object(d.a)(t)&&r(t)}))}))},y=function(t,e,n){return new Promise((function(o,i){var a={subunit_id:t,session_number:e,is_all_subunit:n};l.a.post("/grammar/preview-lesson",a).then((function(t){o(function(t){var e=function(t){if(!t.some((function(t){return"blank"===t.exercise_type})))return t;var e={};return t.filter((function(t){var n=t.options[t.correct],o=n.option.toLowerCase();if(!e[o]){var i=Object(r.a)(Object(r.a)({},n),{},{option:o});return e[o]=i,!0}return!1}))}(t.key_words);return{subunit:{name:t.subunit_name,parsedName:t.subunit_parsed_name},words:e.map((function(t){return{word:t.name?t.name.charAt(0).toUpperCase()+t.name.slice(1):"",description:t.definition?t.definition.replace(/(?<=(?:^|[.?!])\W*)[a-z]/g,(function(t){return t.toUpperCase()})):"",sentence:t.sentence?t.sentence.replace(/(?<=(?:^|[.?!])\W*)[a-z]/g,(function(t){return t.toUpperCase()})):"",parsedName:t.parsed_name,options:t.options,correct:t.correct,exerciseType:t.exercise_type}})),lessonData:t.lesson_data,lessonVerb:t.lesson_verb}}(t))})).catch((function(t){!Object(d.a)(t)&&i(t)}))}))},_=function(t,e,n,r,o,i){var a={class_id:t,subunit_id:e,is_all_subunit:n,session_number:r,students:o,full_class:i};return new Promise((function(t,e){l.a.post("/grammar/check-session-already-assigned",a).then((function(e){return t(e)})).catch((function(t){!Object(d.a)(t)&&e(t)}))}))},w=function(t){return new Promise((function(e,n){l.a.get("/grammar/pending-future-session/".concat(t)).then((function(t){return e(function(t){var e,n;return t?{subunitName:null===(e=t.subunit)||void 0===e?void 0:e.name,subunitParsedName:null===(n=t.subunit)||void 0===n?void 0:n.parsed_name,sessionNumber:t.session_number}:void 0}(t))})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))},O=function(t){return new Promise((function(e,n){l.a.get("/grammar/timeline-assigned/".concat(t)).then((function(t){return e(c(t))})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))},j=function(t){return new Promise((function(e,n){l.a.get("/grammar/timeline-automated/".concat(t)).then((function(t){return e(c(t))})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))},x=function(t){return new Promise((function(e,n){l.a.get("/grammar/bonus-info/".concat(t)).then((function(t){return e({hasBonus:(n=t).has_bonus,completed:n.completed,accuracyRate:n.accuracy_rate});var n})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))},k=function(t){return new Promise((function(e,n){l.a.post("grammar/delete-session",{event_id:t}).then((function(t){return e(t)})).catch((function(t){!Object(d.a)(t)&&n(t)}))}))}}}]);
3//# sourceMappingURL=1.0460b3b5.chunk.js.map

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.