You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
36 KiB
1 line
36 KiB
"use strict";(self.webpackChunkjupyter_web=self.webpackChunkjupyter_web||[]).push([[8409],{51421:function(J,v,D){var s,A=this&&this.__extends||(s=function(r,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])})(r,t)},function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=r}s(r,t),r.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(v,"__esModule",{value:!0}),v.AbstractHandler=void 0;var M=function(s){function r(){return null!==s&&s.apply(this,arguments)||this}return A(r,s),r}(D(67582).AbstractMathDocument),m=function(){function s(r,t){void 0===t&&(t=5),this.documentClass=M,this.adaptor=r,this.priority=t}return Object.defineProperty(s.prototype,"name",{get:function(){return this.constructor.NAME},enumerable:!1,configurable:!0}),s.prototype.handlesDocument=function(r){return!1},s.prototype.create=function(r,t){return new this.documentClass(r,this.adaptor,t)},s.NAME="generic",s}();v.AbstractHandler=m},67582:function(J,v,D){var p,A=this&&this.__extends||(p=function(a,h){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,y){o.__proto__=y}||function(o,y){for(var x in y)Object.prototype.hasOwnProperty.call(y,x)&&(o[x]=y[x])})(a,h)},function(a,h){if("function"!=typeof h&&null!==h)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");function o(){this.constructor=a}p(a,h),a.prototype=null===h?Object.create(h):(o.prototype=h.prototype,new o)}),S=this&&this.__values||function(p){var a="function"==typeof Symbol&&Symbol.iterator,h=a&&p[a],o=0;if(h)return h.call(p);if(p&&"number"==typeof p.length)return{next:function(){return p&&o>=p.length&&(p=void 0),{value:p&&p[o++],done:!p}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},M=this&&this.__read||function(p,a){var h="function"==typeof Symbol&&p[Symbol.iterator];if(!h)return p;var y,g,o=h.call(p),x=[];try{for(;(void 0===a||a-- >0)&&!(y=o.next()).done;)x.push(y.value)}catch(w){g={error:w}}finally{try{y&&!y.done&&(h=o.return)&&h.call(o)}finally{if(g)throw g.error}}return x},m=this&&this.__spreadArray||function(p,a,h){if(h||2===arguments.length)for(var x,o=0,y=a.length;o<y;o++)(x||!(o in a))&&(x||(x=Array.prototype.slice.call(a,0,o)),x[o]=a[o]);return p.concat(x||Array.prototype.slice.call(a))};Object.defineProperty(v,"__esModule",{value:!0}),v.AbstractMathDocument=v.resetAllOptions=v.resetOptions=v.RenderList=void 0;var s=D(80084),r=D(19380),t=D(12098),e=D(57484),n=D(5520),i=D(84789),l=D(97698),d=function(p){function a(){return null!==p&&p.apply(this,arguments)||this}return A(a,p),a.create=function(h){var o,y,x=new this;try{for(var g=S(Object.keys(h)),w=g.next();!w.done;w=g.next()){var O=w.value,E=M(this.action(O,h[O]),2),j=E[0],b=E[1];b&&x.add(j,b)}}catch(P){o={error:P}}finally{try{w&&!w.done&&(y=g.return)&&y.call(g)}finally{if(o)throw o.error}}return x},a.action=function(h,o){var y,x,g,w,O,E,j=!0,b=o[0];if(1===o.length||"boolean"==typeof o[1])2===o.length&&(j=o[1]),O=(y=M(this.methodActions(h),2))[0],E=y[1];else if("string"==typeof o[1])if("string"==typeof o[2]){4===o.length&&(j=o[3]);var P=M(o.slice(1),2),I=P[0],H=P[1];O=(x=M(this.methodActions(I,H),2))[0],E=x[1]}else 3===o.length&&(j=o[2]),O=(g=M(this.methodActions(o[1]),2))[0],E=g[1];else 4===o.length&&(j=o[3]),O=(w=M(o.slice(1),2))[0],E=w[1];return[{id:h,renderDoc:O,renderMath:E,convert:j},b]},a.methodActions=function(h,o){return void 0===o&&(o=h),[function(y){return h&&y[h](),!1},function(y,x){return o&&y[o](x),!1}]},a.prototype.renderDoc=function(h,o){var y,x;void 0===o&&(o=n.STATE.UNPROCESSED);try{for(var g=S(this.items),w=g.next();!w.done;w=g.next()){var O=w.value;if(O.priority>=o&&O.item.renderDoc(h))return}}catch(E){y={error:E}}finally{try{w&&!w.done&&(x=g.return)&&x.call(g)}finally{if(y)throw y.error}}},a.prototype.renderMath=function(h,o,y){var x,g;void 0===y&&(y=n.STATE.UNPROCESSED);try{for(var w=S(this.items),O=w.next();!O.done;O=w.next()){var E=O.value;if(E.priority>=y&&E.item.renderMath(h,o))return}}catch(j){x={error:j}}finally{try{O&&!O.done&&(g=w.return)&&g.call(w)}finally{if(x)throw x.error}}},a.prototype.renderConvert=function(h,o,y){var x,g;void 0===y&&(y=n.STATE.LAST);try{for(var w=S(this.items),O=w.next();!O.done;O=w.next()){var E=O.value;if(E.priority>y||E.item.convert&&E.item.renderMath(h,o))return}}catch(j){x={error:j}}finally{try{O&&!O.done&&(g=w.return)&&g.call(w)}finally{if(x)throw x.error}}},a.prototype.findID=function(h){var o,y;try{for(var x=S(this.items),g=x.next();!g.done;g=x.next()){var w=g.value;if(w.item.id===h)return w.item}}catch(O){o={error:O}}finally{try{g&&!g.done&&(y=x.return)&&y.call(x)}finally{if(o)throw o.error}}return null},a}(D(63670).PrioritizedList);v.RenderList=d,v.resetOptions={all:!1,processed:!1,inputJax:null,outputJax:null},v.resetAllOptions={all:!0,processed:!0,inputJax:[],outputJax:[]};var c=function(p){function a(){return null!==p&&p.apply(this,arguments)||this}return A(a,p),a.prototype.compile=function(h){return null},a}(r.AbstractInputJax),u=function(p){function a(){return null!==p&&p.apply(this,arguments)||this}return A(a,p),a.prototype.typeset=function(h,o){return void 0===o&&(o=null),null},a.prototype.escaped=function(h,o){return null},a}(t.AbstractOutputJax),T=function(p){function a(){return null!==p&&p.apply(this,arguments)||this}return A(a,p),a}(e.AbstractMathList),_=function(p){function a(){return null!==p&&p.apply(this,arguments)||this}return A(a,p),a}(n.AbstractMathItem),L=function(){function p(a,h,o){var y=this,x=this.constructor;this.document=a,this.options=(0,s.userOptions)((0,s.defaultOptions)({},x.OPTIONS),o),this.math=new(this.options.MathList||T),this.renderActions=d.create(this.options.renderActions),this.processed=new p.ProcessBits,this.outputJax=this.options.OutputJax||new u;var g=this.options.InputJax||[new c];Array.isArray(g)||(g=[g]),this.inputJax=g,this.adaptor=h,this.outputJax.setAdaptor(h),this.inputJax.map(function(w){return w.setAdaptor(h)}),this.mmlFactory=this.options.MmlFactory||new i.MmlFactory,this.inputJax.map(function(w){return w.setMmlFactory(y.mmlFactory)}),this.outputJax.initialize(),this.inputJax.map(function(w){return w.initialize()})}return Object.defineProperty(p.prototype,"kind",{get:function(){return this.constructor.KIND},enumerable:!1,configurable:!0}),p.prototype.addRenderAction=function(a){for(var h=[],o=1;o<arguments.length;o++)h[o-1]=arguments[o];var y=M(d.action(a,h),2),x=y[0],g=y[1];this.renderActions.add(x,g)},p.prototype.removeRenderAction=function(a){var h=this.renderActions.findID(a);h&&this.renderActions.remove(h)},p.prototype.render=function(){return this.renderActions.renderDoc(this),this},p.prototype.rerender=function(a){return void 0===a&&(a=n.STATE.RERENDER),this.state(a-1),this.render(),this},p.prototype.convert=function(a,h){void 0===h&&(h={});var o=(0,s.userOptions)({format:this.inputJax[0].name,display:!0,end:n.STATE.LAST,em:16,ex:8,containerWidth:null,lineWidth:1e6,scale:1,family:""},h),y=o.format,x=o.display,g=o.end,w=o.ex,O=o.em,E=o.containerWidth,j=o.lineWidth,b=o.scale,P=o.family;null===E&&(E=80*w);var I=this.inputJax.reduce(function(C,F){return F.name===y?F:C},null),H=new this.options.MathItem(a,I,x);return H.start.node=this.adaptor.body(this.document),H.setMetrics(O,w,E,j,b),this.outputJax.options.mtextInheritFont&&(H.outputData.mtextFamily=P),this.outputJax.options.merrorInheritFont&&(H.outputData.merrorFamily=P),H.convert(this,g),H.typesetRoot||H.root},p.prototype.findMath=function(a){return void 0===a&&(a=null),this.processed.set("findMath"),this},p.prototype.compile=function(){var a,h,o,y;if(!this.processed.isSet("compile")){var x=[];try{for(var g=S(this.math),w=g.next();!w.done;w=g.next()){var O=w.value;this.compileMath(O),void 0!==O.inputData.recompile&&x.push(O)}}catch(P){a={error:P}}finally{try{w&&!w.done&&(h=g.return)&&h.call(g)}finally{if(a)throw a.error}}try{for(var E=S(x),j=E.next();!j.done;j=E.next()){var b=(O=j.value).inputData.recompile;O.state(b.state),O.inputData.recompile=b,this.compileMath(O)}}catch(P){o={error:P}}finally{try{j&&!j.done&&(y=E.return)&&y.call(E)}finally{if(o)throw o.error}}this.processed.set("compile")}return this},p.prototype.compileMath=function(a){try{a.compile(this)}catch(h){if(h.retry||h.restart)throw h;this.options.compileError(this,a,h),a.inputData.error=h}},p.prototype.compileError=function(a,h){a.root=this.mmlFactory.create("math",null,[this.mmlFactory.create("merror",{"data-mjx-error":h.message,title:h.message},[this.mmlFactory.create("mtext",null,[this.mmlFactory.create("text").setText("Math input error")])])]),a.display&&a.root.attributes.set("display","block"),a.inputData.error=h.message},p.prototype.typeset=function(){var a,h;if(!this.processed.isSet("typeset")){try{for(var o=S(this.math),y=o.next();!y.done;y=o.next()){var x=y.value;try{x.typeset(this)}catch(g){if(g.retry||g.restart)throw g;this.options.typesetError(this,x,g),x.outputData.error=g}}}catch(g){a={error:g}}finally{try{y&&!y.done&&(h=o.return)&&h.call(o)}finally{if(a)throw a.error}}this.processed.set("typeset")}return this},p.prototype.typesetError=function(a,h){a.typesetRoot=this.adaptor.node("mjx-container",{class:"MathJax mjx-output-error",jax:this.outputJax.name},[this.adaptor.node("span",{"data-mjx-error":h.message,title:h.message,style:{color:"red","background-color":"yellow","line-height":"normal"}},[this.adaptor.text("Math output error")])]),a.display&&this.adaptor.setAttributes(a.typesetRoot,{style:{display:"block",margin:"1em 0","text-align":"center"}}),a.outputData.error=h.message},p.prototype.getMetrics=function(){return this.processed.isSet("getMetrics")||(this.outputJax.getMetrics(this),this.processed.set("getMetrics")),this},p.prototype.updateDocument=function(){var a,h;if(!this.processed.isSet("updateDocument")){try{for(var o=S(this.math.reversed()),y=o.next();!y.done;y=o.next()){y.value.updateDocument(this)}}catch(g){a={error:g}}finally{try{y&&!y.done&&(h=o.return)&&h.call(o)}finally{if(a)throw a.error}}this.processed.set("updateDocument")}return this},p.prototype.removeFromDocument=function(a){return void 0===a&&(a=!1),this},p.prototype.state=function(a,h){var o,y;void 0===h&&(h=!1);try{for(var x=S(this.math),g=x.next();!g.done;g=x.next()){g.value.state(a,h)}}catch(O){o={error:O}}finally{try{g&&!g.done&&(y=x.return)&&y.call(x)}finally{if(o)throw o.error}}return a<n.STATE.INSERTED&&this.processed.clear("updateDocument"),a<n.STATE.TYPESET&&(this.processed.clear("typeset"),this.processed.clear("getMetrics")),a<n.STATE.COMPILED&&this.processed.clear("compile"),this},p.prototype.reset=function(a){var h;return void 0===a&&(a={processed:!0}),(a=(0,s.userOptions)(Object.assign({},v.resetOptions),a)).all&&Object.assign(a,v.resetAllOptions),a.processed&&this.processed.reset(),a.inputJax&&this.inputJax.forEach(function(o){return o.reset.apply(o,m([],M(a.inputJax),!1))}),a.outputJax&&(h=this.outputJax).reset.apply(h,m([],M(a.outputJax),!1)),this},p.prototype.clear=function(){return this.reset(),this.math.clear(),this},p.prototype.concat=function(a){return this.math.merge(a),this},p.prototype.clearMathItemsWithin=function(a){var h,o=this.getMathItemsWithin(a);return(h=this.math).remove.apply(h,m([],M(o),!1)),o},p.prototype.getMathItemsWithin=function(a){var h,o,y,x;Array.isArray(a)||(a=[a]);var g=this.adaptor,w=[],O=g.getElements(a,this.document);try{t:for(var E=S(this.math),j=E.next();!j.done;j=E.next()){var b=j.value;try{for(var P=(y=void 0,S(O)),I=P.next();!I.done;I=P.next()){var H=I.value;if(b.start.node&&g.contains(H,b.start.node)){w.push(b);continue t}}}catch(C){y={error:C}}finally{try{I&&!I.done&&(x=P.return)&&x.call(P)}finally{if(y)throw y.error}}}}catch(C){h={error:C}}finally{try{j&&!j.done&&(o=E.return)&&o.call(E)}finally{if(h)throw h.error}}return w},p.KIND="MathDocument",p.OPTIONS={OutputJax:null,InputJax:null,MmlFactory:null,MathList:T,MathItem:_,compileError:function(a,h,o){a.compileError(h,o)},typesetError:function(a,h,o){a.typesetError(h,o)},renderActions:(0,s.expandable)({find:[n.STATE.FINDMATH,"findMath","",!1],compile:[n.STATE.COMPILED],metrics:[n.STATE.METRICS,"getMetrics","",!1],typeset:[n.STATE.TYPESET],update:[n.STATE.INSERTED,"updateDocument",!1]})},p.ProcessBits=(0,l.BitFieldClass)("findMath","compile","getMetrics","typeset","updateDocument"),p}();v.AbstractMathDocument=L},57484:function(J,v,D){var m,A=this&&this.__extends||(m=function(s,r){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(s,r)},function(s,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=s}m(s,r),s.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)});Object.defineProperty(v,"__esModule",{value:!0}),v.AbstractMathList=void 0;var M=function(m){function s(){return null!==m&&m.apply(this,arguments)||this}return A(s,m),s.prototype.isBefore=function(r,t){return r.start.i<t.start.i||r.start.i===t.start.i&&r.start.n<t.start.n},s}(D(21779).LinkedList);v.AbstractMathList=M},72161:function(J,v,D){var f,A=this&&this.__extends||(f=function(d,c){return(f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,T){u.__proto__=T}||function(u,T){for(var _ in T)Object.prototype.hasOwnProperty.call(T,_)&&(u[_]=T[_])})(d,c)},function(d,c){if("function"!=typeof c&&null!==c)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function u(){this.constructor=d}f(d,c),d.prototype=null===c?Object.create(c):(u.prototype=c.prototype,new u)}),S=this&&this.__assign||function(){return S=Object.assign||function(f){for(var d,c=1,u=arguments.length;c<u;c++)for(var T in d=arguments[c])Object.prototype.hasOwnProperty.call(d,T)&&(f[T]=d[T]);return f},S.apply(this,arguments)},M=this&&this.__read||function(f,d){var c="function"==typeof Symbol&&f[Symbol.iterator];if(!c)return f;var T,L,u=c.call(f),_=[];try{for(;(void 0===d||d-- >0)&&!(T=u.next()).done;)_.push(T.value)}catch(p){L={error:p}}finally{try{T&&!T.done&&(c=u.return)&&c.call(u)}finally{if(L)throw L.error}}return _},m=this&&this.__values||function(f){var d="function"==typeof Symbol&&Symbol.iterator,c=d&&f[d],u=0;if(c)return c.call(f);if(f&&"number"==typeof f.length)return{next:function(){return f&&u>=f.length&&(f=void 0),{value:f&&f[u++],done:!f}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(v,"__esModule",{value:!0}),v.HTMLDocument=void 0;var s=D(67582),r=D(80084),t=D(93312),e=D(90310),n=D(6087),i=D(5520),l=function(f){function d(c,u,T){var _=this,L=M((0,r.separateOptions)(T,n.HTMLDomStrings.OPTIONS),2),p=L[0],a=L[1];return(_=f.call(this,c,u,p)||this).domStrings=_.options.DomStrings||new n.HTMLDomStrings(a),_.domStrings.adaptor=u,_.styles=[],_}return A(d,f),d.prototype.findPosition=function(c,u,T,_){var L,p,a=this.adaptor;try{for(var h=m(_[c]),o=h.next();!o.done;o=h.next()){var y=o.value,x=M(y,2),g=x[0],w=x[1];if(u<=w&&"#text"===a.kind(g))return{node:g,n:Math.max(u,0),delim:T};u-=w}}catch(O){L={error:O}}finally{try{o&&!o.done&&(p=h.return)&&p.call(h)}finally{if(L)throw L.error}}return{node:null,n:0,delim:T}},d.prototype.mathItem=function(c,u,T){var _=c.math,L=this.findPosition(c.n,c.start.n,c.open,T),p=this.findPosition(c.n,c.end.n,c.close,T);return new this.options.MathItem(_,u,c.display,L,p)},d.prototype.findMath=function(c){var u,T,_,L,p,a,h,o,y;if(!this.processed.isSet("findMath")){this.adaptor.document=this.document,c=(0,r.userOptions)({elements:this.options.elements||[this.adaptor.body(this.document)]},c);try{for(var x=m(this.adaptor.getElements(c.elements,this.document)),g=x.next();!g.done;g=x.next()){var w=g.value,O=M([null,null],2),E=O[0],j=O[1];try{for(var b=(_=void 0,m(this.inputJax)),P=b.next();!P.done;P=b.next()){var I=P.value,H=new this.options.MathList;if(I.processStrings){null===E&&(E=(p=M(this.domStrings.find(w),2))[0],j=p[1]);try{for(var C=(a=void 0,m(I.findMath(E))),F=C.next();!F.done;F=C.next()){var R=F.value;H.push(this.mathItem(R,I,j))}}catch(N){a={error:N}}finally{try{F&&!F.done&&(h=C.return)&&h.call(C)}finally{if(a)throw a.error}}}else try{for(var B=(o=void 0,m(I.findMath(w))),k=B.next();!k.done;k=B.next()){R=k.value;var z=new this.options.MathItem(R.math,I,R.display,R.start,R.end);H.push(z)}}catch(N){o={error:N}}finally{try{k&&!k.done&&(y=B.return)&&y.call(B)}finally{if(o)throw o.error}}this.math.merge(H)}}catch(N){_={error:N}}finally{try{P&&!P.done&&(L=b.return)&&L.call(b)}finally{if(_)throw _.error}}}}catch(N){u={error:N}}finally{try{g&&!g.done&&(T=x.return)&&T.call(x)}finally{if(u)throw u.error}}this.processed.set("findMath")}return this},d.prototype.updateDocument=function(){return this.processed.isSet("updateDocument")||(this.addPageElements(),this.addStyleSheet(),f.prototype.updateDocument.call(this),this.processed.set("updateDocument")),this},d.prototype.addPageElements=function(){var c=this.adaptor.body(this.document),u=this.documentPageElements();u&&this.adaptor.append(c,u)},d.prototype.addStyleSheet=function(){var c=this.documentStyleSheet(),u=this.adaptor;if(c&&!u.parent(c)){var T=u.head(this.document),_=this.findSheet(T,u.getAttribute(c,"id"));_?u.replace(c,_):u.append(T,c)}},d.prototype.findSheet=function(c,u){var T,_;if(u)try{for(var L=m(this.adaptor.tags(c,"style")),p=L.next();!p.done;p=L.next()){var a=p.value;if(this.adaptor.getAttribute(a,"id")===u)return a}}catch(h){T={error:h}}finally{try{p&&!p.done&&(_=L.return)&&_.call(L)}finally{if(T)throw T.error}}return null},d.prototype.removeFromDocument=function(c){var u,T;if(void 0===c&&(c=!1),this.processed.isSet("updateDocument"))try{for(var _=m(this.math),L=_.next();!L.done;L=_.next()){var p=L.value;p.state()>=i.STATE.INSERTED&&p.state(i.STATE.TYPESET,c)}}catch(a){u={error:a}}finally{try{L&&!L.done&&(T=_.return)&&T.call(_)}finally{if(u)throw u.error}}return this.processed.clear("updateDocument"),this},d.prototype.documentStyleSheet=function(){return this.outputJax.styleSheet(this)},d.prototype.documentPageElements=function(){return this.outputJax.pageElements(this)},d.prototype.addStyles=function(c){this.styles.push(c)},d.prototype.getStyles=function(){return this.styles},d.KIND="HTML",d.OPTIONS=S(S({},s.AbstractMathDocument.OPTIONS),{renderActions:(0,r.expandable)(S(S({},s.AbstractMathDocument.OPTIONS.renderActions),{styles:[i.STATE.INSERTED+1,"","updateStyleSheet",!1]})),MathList:e.HTMLMathList,MathItem:t.HTMLMathItem,DomStrings:null}),d}(s.AbstractMathDocument);v.HTMLDocument=l},6087:function(J,v,D){var A=this&&this.__read||function(m,s){var r="function"==typeof Symbol&&m[Symbol.iterator];if(!r)return m;var e,i,t=r.call(m),n=[];try{for(;(void 0===s||s-- >0)&&!(e=t.next()).done;)n.push(e.value)}catch(l){i={error:l}}finally{try{e&&!e.done&&(r=t.return)&&r.call(t)}finally{if(i)throw i.error}}return n};Object.defineProperty(v,"__esModule",{value:!0}),v.HTMLDomStrings=void 0;var S=D(80084),M=function(){function m(s){void 0===s&&(s=null);var r=this.constructor;this.options=(0,S.userOptions)((0,S.defaultOptions)({},r.OPTIONS),s),this.init(),this.getPatterns()}return m.prototype.init=function(){this.strings=[],this.string="",this.snodes=[],this.nodes=[],this.stack=[]},m.prototype.getPatterns=function(){var s=(0,S.makeArray)(this.options.skipHtmlTags),r=(0,S.makeArray)(this.options.ignoreHtmlClass),t=(0,S.makeArray)(this.options.processHtmlClass);this.skipHtmlTags=new RegExp("^(?:"+s.join("|")+")$","i"),this.ignoreHtmlClass=new RegExp("(?:^| )(?:"+r.join("|")+")(?: |$)"),this.processHtmlClass=new RegExp("(?:^| )(?:"+t+")(?: |$)")},m.prototype.pushString=function(){this.string.match(/\S/)&&(this.strings.push(this.string),this.nodes.push(this.snodes)),this.string="",this.snodes=[]},m.prototype.extendString=function(s,r){this.snodes.push([s,r.length]),this.string+=r},m.prototype.handleText=function(s,r){return r||this.extendString(s,this.adaptor.value(s)),this.adaptor.next(s)},m.prototype.handleTag=function(s,r){if(!r){var t=this.options.includeHtmlTags[this.adaptor.kind(s)];this.extendString(s,t)}return this.adaptor.next(s)},m.prototype.handleContainer=function(s,r){this.pushString();var t=this.adaptor.getAttribute(s,"class")||"",e=this.adaptor.kind(s)||"",n=this.processHtmlClass.exec(t),i=s;return!this.adaptor.firstChild(s)||this.adaptor.getAttribute(s,"data-MJX")||!n&&this.skipHtmlTags.exec(e)?i=this.adaptor.next(s):(this.adaptor.next(s)&&this.stack.push([this.adaptor.next(s),r]),i=this.adaptor.firstChild(s),r=(r||this.ignoreHtmlClass.exec(t))&&!n),[i,r]},m.prototype.handleOther=function(s,r){return this.pushString(),this.adaptor.next(s)},m.prototype.find=function(s){var r,t;this.init();for(var e=this.adaptor.next(s),n=!1,i=this.options.includeHtmlTags;s&&s!==e;){var l=this.adaptor.kind(s);"#text"===l?s=this.handleText(s,n):i.hasOwnProperty(l)?s=this.handleTag(s,n):l?(s=(r=A(this.handleContainer(s,n),2))[0],n=r[1]):s=this.handleOther(s,n),!s&&this.stack.length&&(this.pushString(),s=(t=A(this.stack.pop(),2))[0],n=t[1])}this.pushString();var f=[this.strings,this.nodes];return this.init(),f},m.OPTIONS={skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml"],includeHtmlTags:{br:"\n",wbr:"","#comment":""},ignoreHtmlClass:"mathjax_ignore",processHtmlClass:"mathjax_process"},m}();v.HTMLDomStrings=M},59996:function(J,v,D){var s,A=this&&this.__extends||(s=function(r,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])})(r,t)},function(r,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=r}s(r,t),r.prototype=null===t?Object.create(t):(e.prototype=t.prototype,new e)});Object.defineProperty(v,"__esModule",{value:!0}),v.HTMLHandler=void 0;var S=D(51421),M=D(72161),m=function(s){function r(){var t=null!==s&&s.apply(this,arguments)||this;return t.documentClass=M.HTMLDocument,t}return A(r,s),r.prototype.handlesDocument=function(t){var e=this.adaptor;if("string"==typeof t)try{t=e.parse(t,"text/html")}catch{}return t instanceof e.window.Document||t instanceof e.window.HTMLElement||t instanceof e.window.DocumentFragment},r.prototype.create=function(t,e){var n=this.adaptor;if("string"==typeof t)t=n.parse(t,"text/html");else if(t instanceof n.window.HTMLElement||t instanceof n.window.DocumentFragment){var i=t;t=n.parse("","text/html"),n.append(n.body(t),i)}return s.prototype.create.call(this,t,e)},r}(S.AbstractHandler);v.HTMLHandler=m},93312:function(J,v,D){var m,A=this&&this.__extends||(m=function(s,r){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(s,r)},function(s,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=s}m(s,r),s.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)});Object.defineProperty(v,"__esModule",{value:!0}),v.HTMLMathItem=void 0;var S=D(5520),M=function(m){function s(r,t,e,n,i){return void 0===e&&(e=!0),void 0===n&&(n={node:null,n:0,delim:""}),void 0===i&&(i={node:null,n:0,delim:""}),m.call(this,r,t,e,n,i)||this}return A(s,m),Object.defineProperty(s.prototype,"adaptor",{get:function(){return this.inputJax.adaptor},enumerable:!1,configurable:!0}),s.prototype.updateDocument=function(r){if(this.state()<S.STATE.INSERTED){if(this.inputJax.processStrings){var t=this.start.node;if(t===this.end.node)this.end.n&&this.end.n<this.adaptor.value(this.end.node).length&&this.adaptor.split(this.end.node,this.end.n),this.start.n&&(t=this.adaptor.split(this.start.node,this.start.n)),this.adaptor.replace(this.typesetRoot,t);else{for(this.start.n&&(t=this.adaptor.split(t,this.start.n));t!==this.end.node;){var e=this.adaptor.next(t);this.adaptor.remove(t),t=e}this.adaptor.insert(this.typesetRoot,t),this.end.n<this.adaptor.value(t).length&&this.adaptor.split(t,this.end.n),this.adaptor.remove(t)}}else this.adaptor.replace(this.typesetRoot,this.start.node);this.start.node=this.end.node=this.typesetRoot,this.start.n=this.end.n=0,this.state(S.STATE.INSERTED)}},s.prototype.updateStyleSheet=function(r){r.addStyleSheet()},s.prototype.removeFromDocument=function(r){if(void 0===r&&(r=!1),this.state()>=S.STATE.TYPESET){var t=this.adaptor,e=this.start.node,n=t.text("");if(r){var i=this.start.delim+this.math+this.end.delim;if(this.inputJax.processStrings)n=t.text(i);else{var l=t.parse(i,"text/html");n=t.firstChild(t.body(l))}}t.parent(e)&&t.replace(n,e),this.start.node=this.end.node=n,this.start.n=this.end.n=0}},s}(S.AbstractMathItem);v.HTMLMathItem=M},90310:function(J,v,D){var m,A=this&&this.__extends||(m=function(s,r){return(m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(s,r)},function(s,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function t(){this.constructor=s}m(s,r),s.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t)});Object.defineProperty(v,"__esModule",{value:!0}),v.HTMLMathList=void 0;var M=function(m){function s(){return null!==m&&m.apply(this,arguments)||this}return A(s,m),s}(D(57484).AbstractMathList);v.HTMLMathList=M},97698:function(J,v){var r,D=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(n[l]=i[l])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),A=this&&this.__values||function(r){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},S=this&&this.__read||function(r,t){var e="function"==typeof Symbol&&r[Symbol.iterator];if(!e)return r;var i,f,n=e.call(r),l=[];try{for(;(void 0===t||t-- >0)&&!(i=n.next()).done;)l.push(i.value)}catch(d){f={error:d}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(f)throw f.error}}return l},M=this&&this.__spreadArray||function(r,t,e){if(e||2===arguments.length)for(var l,n=0,i=t.length;n<i;n++)(l||!(n in t))&&(l||(l=Array.prototype.slice.call(t,0,n)),l[n]=t[n]);return r.concat(l||Array.prototype.slice.call(t))};Object.defineProperty(v,"__esModule",{value:!0}),v.BitFieldClass=v.BitField=void 0;var m=function(){function r(){this.bits=0}return r.allocate=function(){for(var t,e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{for(var l=A(n),f=l.next();!f.done;f=l.next()){var d=f.value;if(this.has(d))throw new Error("Bit already allocated for "+d);if(this.next===r.MAXBIT)throw new Error("Maximum number of bits already allocated");this.names.set(d,this.next),this.next<<=1}}catch(c){t={error:c}}finally{try{f&&!f.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}},r.has=function(t){return this.names.has(t)},r.prototype.set=function(t){this.bits|=this.getBit(t)},r.prototype.clear=function(t){this.bits&=~this.getBit(t)},r.prototype.isSet=function(t){return!!(this.bits&this.getBit(t))},r.prototype.reset=function(){this.bits=0},r.prototype.getBit=function(t){var e=this.constructor.names.get(t);if(!e)throw new Error("Unknown bit-field name: "+t);return e},r.MAXBIT=1<<31,r.next=1,r.names=new Map,r}();v.BitField=m,v.BitFieldClass=function s(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var e=function(n){function i(){return null!==n&&n.apply(this,arguments)||this}return D(i,n),i}(m);return e.allocate.apply(e,M([],S(r),!1)),e}},55418:function(J,v,D){var t,A=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,l){i.__proto__=l}||function(i,l){for(var f in l)Object.prototype.hasOwnProperty.call(l,f)&&(i[f]=l[f])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),S=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},M=this&&this.__read||function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var l,d,i=n.call(t),f=[];try{for(;(void 0===e||e-- >0)&&!(l=i.next()).done;)f.push(l.value)}catch(c){d={error:c}}finally{try{l&&!l.done&&(n=i.return)&&n.call(i)}finally{if(d)throw d.error}}return f},m=this&&this.__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var f,i=0,l=e.length;i<l;i++)(f||!(i in e))&&(f||(f=Array.prototype.slice.call(e,0,i)),f[i]=e[i]);return t.concat(f||Array.prototype.slice.call(e))};Object.defineProperty(v,"__esModule",{value:!0}),v.FunctionList=void 0;var r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return A(e,t),e.prototype.execute=function(){for(var n,i,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];try{for(var d=S(this),c=d.next();!c.done;c=d.next()){var u=c.value,T=u.item.apply(u,m([],M(l),!1));if(!1===T)return!1}}catch(_){n={error:_}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}return!0},e.prototype.asyncExecute=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var l=-1,f=this.items;return new Promise(function(d,c){!function u(){for(var T;++l<f.length;){var _=(T=f[l]).item.apply(T,m([],M(n),!1));if(_ instanceof Promise)return void _.then(u).catch(function(L){return c(L)});if(!1===_)return void d(!1)}d(!0)}()})},e}(D(63670).PrioritizedList);v.FunctionList=r},21779:function(J,v){var D=this&&this.__generator||function(r,t){var n,i,l,f,e={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return f={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(f[Symbol.iterator]=function(){return this}),f;function d(u){return function(T){return function c(u){if(n)throw new TypeError("Generator is already executing.");for(;e;)try{if(n=1,i&&(l=2&u[0]?i.return:u[0]?i.throw||((l=i.return)&&l.call(i),0):i.next)&&!(l=l.call(i,u[1])).done)return l;switch(i=0,l&&(u=[2&u[0],l.value]),u[0]){case 0:case 1:l=u;break;case 4:return e.label++,{value:u[1],done:!1};case 5:e.label++,i=u[1],u=[0];continue;case 7:u=e.ops.pop(),e.trys.pop();continue;default:if(!(l=(l=e.trys).length>0&&l[l.length-1])&&(6===u[0]||2===u[0])){e=0;continue}if(3===u[0]&&(!l||u[1]>l[0]&&u[1]<l[3])){e.label=u[1];break}if(6===u[0]&&e.label<l[1]){e.label=l[1],l=u;break}if(l&&e.label<l[2]){e.label=l[2],e.ops.push(u);break}l[2]&&e.ops.pop(),e.trys.pop();continue}u=t.call(r,e)}catch(T){u=[6,T],i=0}finally{n=l=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,T])}}},A=this&&this.__read||function(r,t){var e="function"==typeof Symbol&&r[Symbol.iterator];if(!e)return r;var i,f,n=e.call(r),l=[];try{for(;(void 0===t||t-- >0)&&!(i=n.next()).done;)l.push(i.value)}catch(d){f={error:d}}finally{try{i&&!i.done&&(e=n.return)&&e.call(n)}finally{if(f)throw f.error}}return l},S=this&&this.__spreadArray||function(r,t,e){if(e||2===arguments.length)for(var l,n=0,i=t.length;n<i;n++)(l||!(n in t))&&(l||(l=Array.prototype.slice.call(t,0,n)),l[n]=t[n]);return r.concat(l||Array.prototype.slice.call(t))},M=this&&this.__values||function(r){var t="function"==typeof Symbol&&Symbol.iterator,e=t&&r[t],n=0;if(e)return e.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(v,"__esModule",{value:!0}),v.LinkedList=v.ListItem=v.END=void 0,v.END=Symbol();var m=function r(t){void 0===t&&(t=null),this.next=null,this.prev=null,this.data=t};v.ListItem=m;var s=function(){function r(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.list=new m(v.END),this.list.next=this.list.prev=this.list,this.push.apply(this,S([],A(t),!1))}return r.prototype.isBefore=function(t,e){return t<e},r.prototype.push=function(){for(var t,e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{for(var l=M(n),f=l.next();!f.done;f=l.next()){var d=f.value,c=new m(d);c.next=this.list,c.prev=this.list.prev,this.list.prev=c,c.prev.next=c}}catch(u){t={error:u}}finally{try{f&&!f.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}return this},r.prototype.pop=function(){var t=this.list.prev;return t.data===v.END?null:(this.list.prev=t.prev,t.prev.next=this.list,t.next=t.prev=null,t.data)},r.prototype.unshift=function(){for(var t,e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];try{for(var l=M(n.slice(0).reverse()),f=l.next();!f.done;f=l.next()){var d=f.value,c=new m(d);c.next=this.list.next,c.prev=this.list,this.list.next=c,c.next.prev=c}}catch(u){t={error:u}}finally{try{f&&!f.done&&(e=l.return)&&e.call(l)}finally{if(t)throw t.error}}return this},r.prototype.shift=function(){var t=this.list.next;return t.data===v.END?null:(this.list.next=t.next,t.next.prev=this.list,t.next=t.prev=null,t.data)},r.prototype.remove=function(){for(var t,e,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var l=new Map;try{for(var f=M(n),d=f.next();!d.done;d=f.next()){var c=d.value;l.set(c,!0)}}catch(_){t={error:_}}finally{try{d&&!d.done&&(e=f.return)&&e.call(f)}finally{if(t)throw t.error}}for(var u=this.list.next;u.data!==v.END;){var T=u.next;l.has(u.data)&&(u.prev.next=u.next,u.next.prev=u.prev,u.next=u.prev=null),u=T}},r.prototype.clear=function(){return this.list.next.prev=this.list.prev.next=null,this.list.next=this.list.prev=this.list,this},r.prototype[Symbol.iterator]=function(){var t;return D(this,function(e){switch(e.label){case 0:t=this.list.next,e.label=1;case 1:return t.data===v.END?[3,3]:[4,t.data];case 2:return e.sent(),t=t.next,[3,1];case 3:return[2]}})},r.prototype.reversed=function(){var t;return D(this,function(e){switch(e.label){case 0:t=this.list.prev,e.label=1;case 1:return t.data===v.END?[3,3]:[4,t.data];case 2:return e.sent(),t=t.prev,[3,1];case 3:return[2]}})},r.prototype.insert=function(t,e){void 0===e&&(e=null),null===e&&(e=this.isBefore.bind(this));for(var n=new m(t),i=this.list.next;i.data!==v.END&&e(i.data,n.data);)i=i.next;return n.prev=i.prev,n.next=i,i.prev.next=i.prev=n,this},r.prototype.sort=function(t){var e,n;void 0===t&&(t=null),null===t&&(t=this.isBefore.bind(this));var i=[];try{for(var l=M(this),f=l.next();!f.done;f=l.next()){var d=f.value;i.push(new r(d))}}catch(T){e={error:T}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}for(this.list.next=this.list.prev=this.list;i.length>1;){var c=i.shift(),u=i.shift();c.merge(u,t),i.push(c)}return i.length&&(this.list=i[0].list),this},r.prototype.merge=function(t,e){var n,i,l,f,d;void 0===e&&(e=null),null===e&&(e=this.isBefore.bind(this));for(var c=this.list.next,u=t.list.next;c.data!==v.END&&u.data!==v.END;)e(u.data,c.data)?(n=A([c,u],2),u.prev.next=n[0],c.prev.next=n[1],i=A([c.prev,u.prev],2),u.prev=i[0],c.prev=i[1],l=A([t.list,this.list],2),this.list.prev.next=l[0],t.list.prev.next=l[1],f=A([t.list.prev,this.list.prev],2),this.list.prev=f[0],t.list.prev=f[1],c=(d=A([u.next,c],2))[0],u=d[1]):c=c.next;return u.data!==v.END&&(this.list.prev.next=t.list.next,t.list.next.prev=this.list.prev,t.list.prev.next=this.list,this.list.prev=t.list.prev,t.list.next=t.list.prev=t.list),this},r}();v.LinkedList=s},63670:(J,v)=>{Object.defineProperty(v,"__esModule",{value:!0}),v.PrioritizedList=void 0;var D=function(){function A(){this.items=[],this.items=[]}return A.prototype[Symbol.iterator]=function(){var S=0,M=this.items;return{next:function(){return{value:M[S++],done:S>M.length}}}},A.prototype.add=function(S,M){void 0===M&&(M=A.DEFAULTPRIORITY);var m=this.items.length;do{m--}while(m>=0&&M<this.items[m].priority);return this.items.splice(m+1,0,{item:S,priority:M}),S},A.prototype.remove=function(S){var M=this.items.length;do{M--}while(M>=0&&this.items[M].item!==S);M>=0&&this.items.splice(M,1)},A.DEFAULTPRIORITY=5,A}();v.PrioritizedList=D}}]); |