(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[13],{"HaE+":function(e,t,r){"use strict";function n(e,t,r,n,a,i,o){try{var c=e[i](o),s=c.value}catch(u){return void r(u)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var o=e.apply(t,r);function c(e){n(o,a,i,c,s,"next",e)}function s(e){n(o,a,i,c,s,"throw",e)}c(void 0)}))}}r.d(t,"a",(function(){return a}))},oY9k:function(e,t,r){"use strict";var n=function(){if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;if("undefined"!==typeof n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},pLT7:function(e,t,r){"use strict";var n,a,i,o,c,s,u,p,l,b,f,h,O,j,v,y,d,m,x,w,g,k,J,S,P,I,C,z,E,T,G,q,A,R,N,L,B,D,F,Q,M,V,H,U,_,Y,$,K,W,X,Z,ee,te,re,ne,ae,ie,oe,ce,se,ue,pe,le,be=r("o0o1"),fe=r.n(be),he=r("rePB"),Oe=r("HaE+"),je=r("1OyB"),ve=r("vuIU"),ye=r("+Jg9"),de=r("oY9k"),me=r.n(de),xe=r("a3ss"),we=r("Y65e"),ge=(r("+JCI"),r("snK7")),ke=(n=Object(ye.JsonProperty)("graphData",[ge.a],!0),Object(ye.JsonObject)((i=function e(){Object(je.a)(this,e),Object(xe.a)(this,"results",o,this)},o=Object(we.a)(i.prototype,"results",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),a=i))||a),Je=r("reeQ"),Se=(c=Object(ye.JsonProperty)("latex",String),Object(ye.JsonObject)((u=function e(){Object(je.a)(this,e),Object(xe.a)(this,"latex",p,this)},p=Object(we.a)(u.prototype,"latex",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),s=u))||s),Pe=(l=Object(ye.JsonProperty)("equation",String,!0),b=Object(ye.JsonProperty)("answerCount",Number,!0),f=Object(ye.JsonProperty)("correctAnswerIndex",Number,!0),h=Object(ye.JsonProperty)("answers",[String],!0),Object(ye.JsonObject)((j=function e(){Object(je.a)(this,e),Object(xe.a)(this,"equation",v,this),Object(xe.a)(this,"answerCount",y,this),Object(xe.a)(this,"correctAnswerIndex",d,this),Object(xe.a)(this,"answers",m,this)},v=Object(we.a)(j.prototype,"equation",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),y=Object(we.a)(j.prototype,"answerCount",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),d=Object(we.a)(j.prototype,"correctAnswerIndex",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return-1}}),m=Object(we.a)(j.prototype,"answers",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),O=j))||O),Ie=(x=Object(ye.JsonProperty)("variationCount",Number,!0),w=Object(ye.JsonProperty)("eqnVariations",[Pe],!0),g=Object(ye.JsonProperty)("equationId",String,!0),Object(ye.JsonObject)((J=function e(){Object(je.a)(this,e),Object(xe.a)(this,"variationCount",S,this),Object(xe.a)(this,"eqnVariations",P,this),Object(xe.a)(this,"equationId",I,this)},S=Object(we.a)(J.prototype,"variationCount",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),P=Object(we.a)(J.prototype,"eqnVariations",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),I=Object(we.a)(J.prototype,"equationId",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),k=J))||k),Ce=r("rW9P"),ze=r("qJ2L"),Ee=r("vIqQ"),Te=r("rCjj"),Ge=(C=Object(ye.JsonProperty)("videos",[ze.a],!0),z=Object(ye.JsonProperty)("entites",[Ce.a],!0),E=Object(ye.JsonProperty)("images",[Ee.a],!0),T=Object(ye.JsonProperty)("worksheets",[Te.a],!0),Object(ye.JsonObject)((q=function e(){Object(je.a)(this,e),Object(xe.a)(this,"videos",A,this),Object(xe.a)(this,"entities",R,this),Object(xe.a)(this,"images",N,this),Object(xe.a)(this,"worksheets",L,this)},A=Object(we.a)(q.prototype,"videos",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),R=Object(we.a)(q.prototype,"entities",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),N=Object(we.a)(q.prototype,"images",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),L=Object(we.a)(q.prototype,"worksheets",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),G=q))||G),qe=(B=Object(ye.JsonObject)("MathOCRResponse"),D=Object(ye.JsonProperty)("latex",String,!0),F=Object(ye.JsonProperty)("ocrText",String,!0),Q=Object(ye.JsonProperty)("solution",String,!0),M=Object(ye.JsonProperty)("timestamp",Number,!0),V=Object(ye.JsonProperty)("isError",Boolean,!0),H=Object(ye.JsonProperty)("errorMessage",String,!0),U=Object(ye.JsonProperty)("customLatex",String,!0),_=Object(ye.JsonProperty)("keyboardLatexInput",String,!0),B(($=function e(){Object(je.a)(this,e),Object(xe.a)(this,"latex",K,this),Object(xe.a)(this,"ocrText",W,this),Object(xe.a)(this,"solution",X,this),Object(xe.a)(this,"timestamp",Z,this),Object(xe.a)(this,"isError",ee,this),Object(xe.a)(this,"errorMessage",te,this),Object(xe.a)(this,"customLatex",re,this),Object(xe.a)(this,"keyboardLatexInput",ne,this)},K=Object(we.a)($.prototype,"latex",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),W=Object(we.a)($.prototype,"ocrText",[F],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),X=Object(we.a)($.prototype,"solution",[Q],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Z=Object(we.a)($.prototype,"timestamp",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ee=Object(we.a)($.prototype,"isError",[V],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),te=Object(we.a)($.prototype,"errorMessage",[H],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),re=Object(we.a)($.prototype,"customLatex",[U],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ne=Object(we.a)($.prototype,"keyboardLatexInput",[_],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Y=$))||Y),Ae=(ae=Object(ye.JsonProperty)("e",String,!0),Object(ye.JsonObject)((oe=function e(){Object(je.a)(this,e),Object(xe.a)(this,"e",ce,this)},ce=Object(we.a)(oe.prototype,"e",[ae],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ie=oe))||ie),Re=(se=Object(ye.JsonProperty)("values",[Ae],!0),Object(ye.JsonObject)((pe=function e(){Object(je.a)(this,e),Object(xe.a)(this,"values",le,this)},le=Object(we.a)(pe.prototype,"values",[se],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ue=pe))||ue),Ne=r("vC87");function Le(e,t){var r;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"===typeof e)return Be(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Be(e,t)}(e))||t&&e&&"number"===typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,c=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){c=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(c)throw i}}}}function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==c[1]?c[1]:"Sketch",n={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({data:t,clientInfo:Fe({platform:"web"},Ne.a.GetClientInfo()),inputForm:r,timestamp:(new Date).getTime()}),credentials:"include"},e.prev=2,e.next=5,me()("".concat(Qe,"/cameraexp/api/v1/getlatex"),n);case 5:if(!(a=e.sent)||!a.ok){e.next=14;break}return e.next=9,a.json();case 9:if(!(i=e.sent)){e.next=14;break}if(!(o=(new ye.JsonConvert).deserializeObject(i,qe))||o.isError||!o.latex){e.next=14;break}return e.abrupt("return",o);case 14:e.next=18;break;case 16:e.prev=16,e.t0=e.catch(2);case 18:return e.abrupt("return",new qe);case 19:case"end":return e.stop()}}),e,null,[[2,16]])})));return function(t){return e.apply(this,arguments)}}()},{key:"SolveSimpleLatex",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){var r,n,a,i;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({LatexExpression:t,clientInfo:Fe({platform:"web"},Ne.a.GetClientInfo())}),credentials:"include"},e.prev=1,e.next=4,me()("".concat(Qe,"/cameraexp/api/v1/solvesimplelatex"),r);case 4:if(!(n=e.sent)||!n.ok){e.next=13;break}return e.next=8,n.json();case 8:if(!(a=e.sent)){e.next=13;break}if(!(i=(new ye.JsonConvert).deserializeObject(a,qe))){e.next=13;break}return e.abrupt("return",i.solution);case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(1);case 17:return e.abrupt("return","");case 18:case"end":return e.stop()}}),e,null,[[1,15]])})));return function(t){return e.apply(this,arguments)}}()},{key:"GetExpressionFromEquationId",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){var r,n,a,i;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{},method:"GET",credentials:"include"},e.prev=1,e.next=4,me()("".concat(Qe,"/cameraexp/api/v1/getequation?equationId=").concat(t.replace("@","")),r);case 4:if(!(n=e.sent)||!n.ok){e.next=15;break}return e.next=8,n.json();case 8:if(!(a=e.sent)){e.next=15;break}if(!(i=(new ye.JsonConvert).deserializeObject(a,Se))){e.next=15;break}if(""!==i.latex){e.next=14;break}return e.abrupt("return","@NOTFOUND");case 14:return e.abrupt("return",i.latex);case 15:e.next=19;break;case 17:e.prev=17,e.t0=e.catch(1);case 19:return e.abrupt("return",void 0);case 20:case"end":return e.stop()}}),e,null,[[1,17]])})));return function(t){return e.apply(this,arguments)}}()},{key:"GetAnswerFromExpression",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t,r){var n,a,i,o,c,s,u,p,l,b,f=arguments;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=f.length>2&&void 0!==f[2]?f[2]:{},a=n.customLatex,i=void 0===a?t:a,o=n.showCustomResult,c=void 0!==o&&o,s={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({latexExpression:t,clientInfo:Fe({platform:"web",mkt:r,skipGraphOutput:!0,skipBingVideoEntity:!0},Ne.a.GetClientInfo()),customLatex:i,showCustomResult:c}),credentials:"include"},e.prev=3,e.next=6,me()("".concat(Qe,"/cameraexp/api/v1/solvelatex"),s);case 6:if(!(u=e.sent)||!u.ok){e.next=15;break}return e.next=10,u.json();case 10:if(!(p=e.sent)){e.next=15;break}return(l=this.processSolveResponse(p))&&l.mathSolverResult&&"\\pi"===t&&(l.mathSolverResult.actions[0].solution="$3.1415926535897932$",l.mathSolverResult.keyboardLatexInput="\\pi"),e.abrupt("return",l);case 15:e.next=23;break;case 17:return e.prev=17,e.t0=e.catch(3),(b=new Je.a).isError=!0,b.errorMessage="OFFLINE",e.abrupt("return",b);case 23:return e.abrupt("return",void 0);case 24:case"end":return e.stop()}}),e,this,[[3,17]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"GetAnswerFromEquationId",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t,r){var n,a,i;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({skipCustomParser:!1,clientInfo:Fe({platform:"web",mkt:r},Ne.a.GetClientInfo()),skipGraphOutput:!1,skipBingVideoEntity:!0,equationId:t.replace("@","")}),credentials:"include"},e.prev=1,e.next=4,me()("".concat(Qe,"/cameraexp/api/v1/solveid"),n);case 4:if(!(a=e.sent)||!a.ok){e.next=11;break}return e.next=8,a.json();case 8:if(!(i=e.sent)){e.next=11;break}return e.abrupt("return",this.processSolveResponse(i));case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(1);case 15:return e.abrupt("return",void 0);case 16:case"end":return e.stop()}}),e,this,[[1,13]])})));return function(t,r){return e.apply(this,arguments)}}()},{key:"GetGraphDataFromGraphExpressions",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(){var t,r,n,a,i,o,c=arguments;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:[],r=c.length>1&&void 0!==c[1]?c[1]:[],n=c.length>2&&void 0!==c[2]?c[2]:null,a={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({graphExpressions:t,latexExpressions:r,graphRange:n,getDetailedInfo:!0,clientInfo:Fe({platform:"web"},Ne.a.GetClientInfo())}),credentials:"include"},e.next=6,me()("".concat(Qe,"/cameraexp/api/v1/getgraphdata"),a);case 6:if(!(i=e.sent)||!i.ok){e.next=13;break}return e.next=10,i.json();case 10:if(!(o=e.sent)){e.next=13;break}return e.abrupt("return",(new ye.JsonConvert).deserializeObject(o,ke));case 13:return e.abrupt("return",void 0);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"GetBingAnswers",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){var r,n,a;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify({queryInfo:t}),credentials:"include"},e.next=3,me()("".concat(Qe,"/cameraexp/api/v1/generateCustomBingAnswers"),r);case 3:if(!(n=e.sent)||!n.ok){e.next=10;break}return e.next=7,n.json();case 7:if(!(a=e.sent)){e.next=10;break}return e.abrupt("return",(new ye.JsonConvert).deserializeObject(a,Ge));case 10:return e.abrupt("return",void 0);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"GetPopularProblems",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){var r,n,a,i;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{},method:"GET",credentials:"include"},e.prev=1,e.next=4,me()("https://bingedu.azureedge.net/mathuxjs/popular/popular-".concat(t,".json"),r);case 4:if(!(n=e.sent)||!n.ok){e.next=13;break}return e.next=8,n.json();case 8:if(!(a=e.sent)){e.next=13;break}if(!(i=(new ye.JsonConvert).deserializeObject(a,Re))){e.next=13;break}return e.abrupt("return",i.values);case 13:e.next=17;break;case 15:e.prev=15,e.t0=e.catch(1);case 17:return e.abrupt("return",void 0);case 18:case"end":return e.stop()}}),e,null,[[1,15]])})));return function(t){return e.apply(this,arguments)}}()},{key:"GenerateQuiz",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.fetchQuiz({latex:t,maxQuestions:5}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"GetQuiz",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.fetchQuiz({EquationId:t}));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"fetchQuiz",value:function(){var e=Object(Oe.a)(fe.a.mark((function e(t){var r,n,a;return fe.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(t),credentials:"include"},e.prev=1,e.next=4,me()("".concat(Qe,"/cameraexp/api/v1/generateproblems"),r);case 4:if(!(n=e.sent)||!n.ok){e.next=11;break}return e.next=8,n.json();case 8:if(!(a=e.sent)){e.next=11;break}return e.abrupt("return",(new ye.JsonConvert).deserializeObject(a,Ie));case 11:e.next=15;break;case 13:e.prev=13,e.t0=e.catch(1);case 15:return e.abrupt("return",void 0);case 16:case"end":return e.stop()}}),e,null,[[1,13]])})));return function(t){return e.apply(this,arguments)}}()},{key:"processSolveResponse",value:function(e){var t=JSON.parse(e.results[0].tags[0].actions[0].customData),r=(new ye.JsonConvert).deserializeObject(JSON.parse(t.previewText),Je.a);if(r.mathSolverResult&&r.mathSolverResult.actions&&r.mathSolverResult.actions.length>0){var n,a=[],i=[],o=Le(r.mathSolverResult.actions);try{for(o.s();!(n=o.n()).done;){var c=n.value;c.templateSteps&&c.templateSteps.length>0?a.push(c):i.push(c)}}catch(s){o.e(s)}finally{o.f()}r.mathSolverResult.actions=a.concat(i)}return r.entities=[],r.videos=[],r}}]),e}();t.a=new Me},vC87:function(e,t,r){"use strict";var n=r("1OyB"),a=r("vuIU"),i=r("rePB"),o=function(){function e(){Object(n.a)(this,e),Object(i.a)(this,"clientInfo",{})}return Object(a.a)(e,[{key:"SetClientInfo",value:function(e){this.clientInfo=e}},{key:"GetClientInfo",value:function(){return this.clientInfo}}]),e}();t.a=new o}}]);