Welcome to mirror list, hosted at ThFree Co, Russian Federation.

explorer.js « a11y « MathJax « static - github.com/epistemehealth/health-science-journal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 56fa3ca916126c5d3c5b31196d3243458b7831cb (plain)
1
!function(o){var r={};function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}i.m=o,i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=14)}([function(t,e,o){"use strict";var s=this&&this.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=n.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return a},n=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t},l=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var r=(i.stopEvent=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopImmediatePropagation?t.stopImmediatePropagation():t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0},i.create=function(t,e,o){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];return new(this.bind.apply(this,n([void 0,t,e,o],r)))},i.prototype.Events=function(){return this.events},Object.defineProperty(i.prototype,"active",{get:function(){return this._active},set:function(t){this._active=t},enumerable:!0,configurable:!0}),i.prototype.Attach=function(){this.AddEvents()},i.prototype.Detach=function(){this.RemoveEvents()},i.prototype.Start=function(){this.highlighter=this.getHighlighter(),this.active=!0},i.prototype.Stop=function(){this.active&&(this.region.Clear(),this.region.Hide(),this.active=!1)},i.prototype.AddEvents=function(){var e,t;try{for(var o=l(this.events),r=o.next();!r.done;r=o.next()){var i=s(r.value,2),n=i[0],a=i[1];this.node.addEventListener(n,a)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},i.prototype.RemoveEvents=function(){var e,t;try{for(var o=l(this.events),r=o.next();!r.done;r=o.next()){var i=s(r.value,2),n=i[0],a=i[1];this.node.removeEventListener(n,a)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},i.prototype.Update=function(t){void 0===t&&(t=!1)},i.prototype.getHighlighter=function(){var t=this.document.options.a11y,e={color:t.foregroundColor.toLowerCase(),alpha:t.foregroundOpacity},o={color:t.backgroundColor.toLowerCase(),alpha:t.backgroundOpacity};return sre.HighlighterFactory.highlighter(o,e,{renderer:this.document.outputJax.name,browser:"v3"})},i.prototype.stopEvent=function(t){this.stoppable&&i.stopEvent(t)},i);function i(t,e,o){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i];this.document=t,this.region=e,this.node=o,this.stoppable=!0,this.events=[],this.highlighter=this.getHighlighter(),this._active=!1}e.AbstractExplorer=r},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sreReady=MathJax._.a11y.sre.sreReady},function(t,e,o){"use strict";var r,i,n,a,s=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var l=o(13);o(1);var h=(c.prototype.AddStyles=function(){if(!this.CLASS.styleAdded){var t=this.document.adaptor.node("style");t.innerHTML=this.CLASS.style.cssText,this.document.adaptor.head(this.document.adaptor.document).appendChild(t),this.CLASS.styleAdded=!0}},c.prototype.AddElement=function(){var t=this.document.adaptor.node("div");t.classList.add(this.CLASS.className),t.style.backgroundColor="white",this.div=t,this.inner=this.document.adaptor.node("div"),this.div.appendChild(this.inner),this.document.adaptor.body(this.document.adaptor.document).appendChild(this.div)},c.prototype.Show=function(t,e){this.position(t),this.highlight(e),this.div.classList.add(this.CLASS.className+"_Show")},c.prototype.Hide=function(){this.div.classList.remove(this.CLASS.className+"_Show")},c.prototype.stackRegions=function(t){for(var e=t.getBoundingClientRect(),o=0,r=Number.POSITIVE_INFINITY,i=this.document.adaptor.document.getElementsByClassName(this.CLASS.className+"_Show"),n=0,a=void 0;a=i[n];n++)a!==this.div&&(o=Math.max(a.getBoundingClientRect().bottom,o),r=Math.min(a.getBoundingClientRect().left,r));var s=(o||e.bottom+10)+window.pageYOffset,l=(r<Number.POSITIVE_INFINITY?r:e.left)+window.pageXOffset;this.div.style.top=s+"px",this.div.style.left=l+"px"},c.styleAdded=!1,c);function c(t){this.document=t,this.CLASS=this.constructor,this.AddStyles(),this.AddElement()}e.AbstractRegion=h;var p,u=(s(d,p=h),d.prototype.Clear=function(){},d.prototype.Update=function(){},d.prototype.Hide=function(){},d.prototype.Show=function(){},d.prototype.AddElement=function(){},d.prototype.AddStyles=function(){},d.prototype.position=function(){},d.prototype.highlight=function(t){},d);function d(){return null!==p&&p.apply(this,arguments)||this}e.DummyRegion=u;var f,y=(s(v,f=h),v.prototype.Clear=function(){this.Update(""),this.inner.style.top="",this.inner.style.backgroundColor=""},v.prototype.Update=function(t){this.inner.textContent="",this.inner.textContent=t},v.prototype.position=function(t){this.stackRegions(t)},v.prototype.highlight=function(t){var e=t.colorString();this.inner.style.backgroundColor=e.background,this.inner.style.color=e.foreground},v);function v(){return null!==f&&f.apply(this,arguments)||this}e.StringRegion=y;var g,m=(s(b,g=y),b.className="MJX_ToolTip",b.style=new l.CssStyles(((i={})["."+b.className]={position:"absolute",display:"inline-block",height:"1px",width:"1px"},i["."+b.className+"_Show"]={width:"auto",height:"auto",opacity:1,"text-align":"center","border-radius":"6px",padding:"0px 0px","border-bottom":"1px dotted black",position:"absolute","z-index":202},i)),b);function b(){return null!==g&&g.apply(this,arguments)||this}e.ToolTip=m;var x,_=(s(S,x=y),S.className="MJX_LiveRegion",S.style=new l.CssStyles(((n={})["."+S.className]={position:"absolute",top:"0",height:"1px",width:"1px",padding:"1px",overflow:"hidden"},n["."+S.className+"_Show"]={top:"0",position:"absolute",width:"auto",height:"auto",padding:"0px 0px",opacity:1,"z-index":"202",left:0,right:0,margin:"0 auto","background-color":"rgba(0, 0, 255, 0.2)","box-shadow":"0px 10px 20px #888",border:"2px solid #CCCCCC"},n)),S);function S(t){var e=x.call(this,t)||this;return e.document=t,e.div.setAttribute("aria-live","assertive"),e}e.LiveRegion=_;var M,w=(s(O,M=h),O.prototype.position=function(t){var e,o=t.getBoundingClientRect(),r=this.div.getBoundingClientRect(),i=o.left+o.width/2-r.width/2;switch(i=i<0?0:i,i+=window.pageXOffset,this.document.options.a11y.align){case"top":e=o.top-r.height-10;break;case"bottom":e=o.bottom+10;break;case"center":default:e=o.top+o.height/2-r.height/2}e=(e+=window.pageYOffset)<0?0:e,this.div.style.top=e+"px",this.div.style.left=i+"px"},O.prototype.highlight=function(t){if(!this.inner.firstChild||this.inner.firstChild.hasAttribute("sre-highlight")){var e=t.colorString();this.inner.style.backgroundColor=e.background,this.inner.style.color=e.foreground}},O.prototype.Show=function(t,e){this.div.style.fontSize=this.document.options.a11y.magnify,this.Update(t),M.prototype.Show.call(this,t,e)},O.prototype.Clear=function(){this.inner.textContent="",this.inner.style.top="",this.inner.style.backgroundColor=""},O.prototype.Update=function(t){this.Clear();var e=this.cloneNode(t);this.inner.appendChild(e)},O.prototype.cloneNode=function(t){var e=t.cloneNode(!0);if("MJX-CONTAINER"!==e.nodeName){"g"!==e.nodeName&&(e.style.marginLeft=e.style.marginRight="0");for(var o=t;o&&"MJX-CONTAINER"!==o.nodeName;)o=o.parentNode;if("MJX-MATH"!==e.nodeName&&"svg"!==e.nodeName&&"svg"===(e=o.firstChild.cloneNode(!1).appendChild(e).parentNode).nodeName){e.firstChild.setAttribute("transform","matrix(1 0 0 -1 0 0)");var r=parseFloat(e.getAttribute("viewBox").split(/ /)[2]),i=parseFloat(e.getAttribute("width")),n=t.getBBox(),a=n.x,s=n.y,l=n.width,h=n.height;e.setAttribute("viewBox",[a,-(s+h),l,h].join(" ")),e.removeAttribute("style"),e.setAttribute("width",i/r*l+"ex"),e.setAttribute("height",i/r*h+"ex"),o.setAttribute("sre-highlight","false")}(e=o.cloneNode(!1).appendChild(e).parentNode).style.margin="0"}return e},O.className="MJX_HoverRegion",O.style=new l.CssStyles(((a={})["."+O.className]={position:"absolute",height:"1px",width:"1px",padding:"1px",overflow:"hidden"},a["."+O.className+"_Show"]={position:"absolute",width:"max-content",height:"auto",padding:"0px 0px",opacity:1,"z-index":"202",margin:"0 auto","background-color":"rgba(0, 0, 255, 0.2)","box-shadow":"0px 10px 20px #888",border:"2px solid #CCCCCC"},a)),O);function O(t){var e=M.call(this,t)||this;return e.document=t,e.inner.style.lineHeight="0",e}e.HoverRegion=w},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,o=1,r=arguments.length;o<r;o++)for(var i in e=arguments[o])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},h=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=n.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return a},p=this&&this.__spread||function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(c(arguments[e]));return t};Object.defineProperty(e,"__esModule",{value:!0});var l=o(8),a=o(9),s=o(10),u=o(11),d=o(12),f=o(5),y=o(6),v=o(7),g=o(2);function m(t,r){return i(e,s=t),e.prototype.explorable=function(t){if(!(this.state()>=l.STATE.EXPLORER||this.isEscaped)){var e=this.typesetRoot,o=r(this.root);this.savedId&&(this.typesetRoot.setAttribute("sre-explorer-id",this.savedId),this.savedId=null),this.explorers=function(t,e,o){var r,i,n={};try{for(var a=h(Object.keys(x)),s=a.next();!s.done;s=a.next()){var l=s.value;n[l]=x[l](t,e,o)}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return n}(t,e,o),this.attachExplorers(t),this.state(l.STATE.EXPLORER)}},e.prototype.attachExplorers=function(t){var e,o;this.attached=[];try{for(var r=h(Object.keys(this.explorers)),i=r.next();!i.done;i=r.next()){var n=i.value,a=this.explorers[n];t.options.a11y[n]?(a.Attach(),this.attached.push(a)):a.Detach()}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}this.addExplorers(this.attached)},e.prototype.rerender=function(t,e){var o,r;void 0===e&&(e=l.STATE.RERENDER),this.savedId=this.typesetRoot.getAttribute("sre-explorer-id"),this.refocus=window.document.activeElement===this.typesetRoot;try{for(var i=h(this.attached),n=i.next();!n.done;n=i.next()){var a=n.value;a.active&&(this.restart=!0,a.Stop())}}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}s.prototype.rerender.call(this,t,e)},e.prototype.updateDocument=function(t){s.prototype.updateDocument.call(this,t),this.refocus&&this.typesetRoot.focus(),this.restart&&this.attached.forEach(function(t){return t.Start()}),this.refocus=this.restart=!1},e.prototype.addExplorers=function(t){var e,o;if(!(t.length<=1)){var r=null;try{for(var i=h(this.attached),n=i.next();!n.done;n=i.next()){var a=n.value;a instanceof f.AbstractKeyExplorer&&(a.stoppable=!1,r=a)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}r&&(r.stoppable=!0)}},e;function e(){var t=null!==s&&s.apply(this,arguments)||this;return t.explorers={},t.attached=[],t.restart=!1,t.refocus=!1,t.savedId=null,t}var s}function b(t){var e,a;return i(o,a=t),o.prototype.explorable=function(){var e,t;if(!this.processed.isSet("explorer")){try{for(var o=h(this.math),r=o.next();!r.done;r=o.next())r.value.explorable(this)}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}this.processed.set("explorer")}return this},o.prototype.state=function(t,e){return void 0===e&&(e=!1),a.prototype.state.call(this,t,e),t<l.STATE.EXPLORER&&this.processed.clear("explorer"),this},(e=o).OPTIONS=n(n({},t.OPTIONS),{enrichSpeech:"shallow",renderActions:s.expandable(n(n({},t.OPTIONS.renderActions),{explorable:[l.STATE.EXPLORER]})),a11y:{align:"top",backgroundColor:"Blue",backgroundOpacity:.2,braille:!1,flame:!1,foregroundColor:"Black",foregroundOpacity:1,highlight:"None",hover:!1,infoPrefix:!1,infoRole:!1,infoType:!1,keyMagnifier:!1,locale:"en",magnification:"None",magnify:"400%",mouseMagnifier:!1,speech:!0,speechRules:"mathspeak-default",subtitles:!0,treeColoring:!1,viewBraille:!1}}),e;function o(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=a.apply(this,p(t))||this,r=o.constructor.ProcessBits;r.has("explorer")||r.allocate("explorer");var i,n=new u.SerializedMmlVisitor(o.mmlFactory);return o.options.MathItem=m(o.options.MathItem,function(t){return n.visitTree(t)}),o.explorerRegions=(i=o,{speechRegion:new g.LiveRegion(i),brailleRegion:new g.LiveRegion(i),magnifier:new g.HoverRegion(i),tooltip1:new g.ToolTip(i),tooltip2:new g.ToolTip(i),tooltip3:new g.ToolTip(i)}),o}}l.newState("EXPLORER",160),e.ExplorerMathItemMixin=m,e.ExplorerMathDocumentMixin=b,e.ExplorerHandler=function(t,e){return void 0===e&&(e=null),!t.documentClass.prototype.enrich&&e&&(t=a.EnrichHandler(t,e)),t.documentClass=b(t.documentClass),t};var x={speech:function(t,e){for(var o,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var n=(o=f.SpeechExplorer).create.apply(o,p([t,t.explorerRegions.speechRegion,e],r)),a=c(t.options.a11y.speechRules.split("-"),2),s=a[0],l=a[1];return n.speechGenerator.setOptions({locale:t.options.a11y.locale,domain:s,style:l,modality:"speech"}),n.showRegion="subtitles",n},braille:function(t,e){for(var o,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var n=(o=f.SpeechExplorer).create.apply(o,p([t,t.explorerRegions.brailleRegion,e],r));return n.speechGenerator.setOptions({locale:"nemeth",domain:"default",style:"default",modality:"braille"}),n.showRegion="viewBraille",n},keyMagnifier:function(t,e){for(var o,r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return(o=f.Magnifier).create.apply(o,p([t,t.explorerRegions.magnifier,e],r))},mouseMagnifier:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return y.ContentHoverer.create(t,t.explorerRegions.magnifier,e,function(t){return t.hasAttribute("data-semantic-type")},function(t){return t})},hover:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return y.FlameHoverer.create(t,null,e)},infoType:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return y.ValueHoverer.create(t,t.explorerRegions.tooltip1,e,function(t){return t.hasAttribute("data-semantic-type")},function(t){return t.getAttribute("data-semantic-type")})},infoRole:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return y.ValueHoverer.create(t,t.explorerRegions.tooltip2,e,function(t){return t.hasAttribute("data-semantic-role")},function(t){return t.getAttribute("data-semantic-role")})},infoPrefix:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return y.ValueHoverer.create(t,t.explorerRegions.tooltip3,e,function(t){return t.hasAttribute("data-semantic-prefix")},function(t){return t.getAttribute("data-semantic-prefix")})},flame:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return v.FlameColorer.create(t,null,e)},treeColoring:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];return v.TreeColorer.create.apply(v.TreeColorer,p([t,null,e],o))}};function _(t,e,o){switch(e){case"magnification":switch(o){case"None":t.options.a11y.magnification=o,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!1;break;case"Keyboard":t.options.a11y.magnification=o,t.options.a11y.keyMagnifier=!0,t.options.a11y.mouseMagnifier=!1;break;case"Mouse":t.options.a11y.magnification=o,t.options.a11y.keyMagnifier=!1,t.options.a11y.mouseMagnifier=!0}break;case"highlight":switch(o){case"None":t.options.a11y.highlight=o,t.options.a11y.hover=!1,t.options.a11y.flame=!1;break;case"Hover":t.options.a11y.highlight=o,t.options.a11y.hover=!0,t.options.a11y.flame=!1;break;case"Flame":t.options.a11y.highlight=o,t.options.a11y.hover=!1,t.options.a11y.flame=!0}break;default:t.options.a11y[e]=o}}e.setA11yOptions=function(t,e){var o,r;for(var i in e)void 0!==t.options.a11y[i]&&_(t,i,e[i]);try{for(var n=h(t.math),a=n.next();!a.done;a=n.next()){a.value.attachExplorers(t)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}},e.setA11yOption=_;d.MJContextMenu.DynamicSubmenus.set("Clearspeak",function(t,e){var o=sre.ClearspeakPreferences.smartPreferences(t.mathItem,"en");return ContextMenu.SubMenu.parse({items:o,id:"Clearspeak"},e)})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObject=MathJax._.components.global.isObject,e.combineConfig=MathJax._.components.global.combineConfig,e.combineDefaults=MathJax._.components.global.combineDefaults,e.combineWithMathJax=MathJax._.components.global.combineWithMathJax,e.MathJax=MathJax._.components.global.MathJax},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=n.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var a,s=o(0),l=o(1),h=(a=s.AbstractExplorer,i(c,a),c.prototype.FocusIn=function(t){},c.prototype.FocusOut=function(t){this.Stop()},c.prototype.Update=function(t){void 0===t&&(t=!1),(this.active||t)&&(this.highlighter.unhighlight(),this.highlighter.highlight(this.walker.getFocus(!0).getNodes()))},c.prototype.Attach=function(){a.prototype.Attach.call(this),this.oldIndex=this.node.tabIndex,this.node.tabIndex=1,this.node.setAttribute("role","application")},c.prototype.Detach=function(){this.node.tabIndex=this.oldIndex,this.oldIndex=null,this.node.removeAttribute("role"),a.prototype.Detach.call(this)},c.prototype.Stop=function(){this.active&&(this.highlighter.unhighlight(),this.walker.deactivate()),a.prototype.Stop.call(this)},c);function c(){var t=null!==a&&a.apply(this,arguments)||this;return t.events=a.prototype.Events.call(t).concat([["keydown",t.KeyDown.bind(t)],["focusin",t.FocusIn.bind(t)],["focusout",t.FocusOut.bind(t)]]),t.oldIndex=null,t}e.AbstractKeyExplorer=h;var p,u=(i(d,p=h),d.prototype.Start=function(){var t=this,e=this.getOptions();if(!this.init)return this.init=!0,void l.sreReady().then(function(){SRE.engineSetup().locale!==e.locale&&SRE.setupEngine({locale:e.locale}),l.sreReady().then(function(){t.Speech(t.walker),t.Start()})}).catch(function(t){return console.log(t.message)});p.prototype.Start.call(this),this.speechGenerator=sre.SpeechGeneratorFactory.generator("Direct"),this.speechGenerator.setOptions(e),this.walker=sre.WalkerFactory.walker("table",this.node,this.speechGenerator,this.highlighter,this.mml),this.walker.activate(),this.Update(),this.document.options.a11y[this.showRegion]&&this.region.Show(this.node,this.highlighter),this.restarted=!0},d.prototype.Update=function(t){void 0===t&&(t=!1),p.prototype.Update.call(this,t),this.region.Update(this.walker.speech());var e=this.speechGenerator.getOptions();"speech"===e.modality&&(this.document.options.a11y.speechRules=e.domain+"-"+e.style)},d.prototype.Speech=function(t){t.speech(),this.node.setAttribute("hasspeech","true"),this.Update(),this.restarted&&this.document.options.a11y[this.showRegion]&&this.region.Show(this.node,this.highlighter)},d.prototype.KeyDown=function(t){var e=t.keyCode;return 27===e?(this.Stop(),void this.stopEvent(t)):this.active?(this.Move(e),void this.stopEvent(t)):void((32===e&&t.shiftKey||13===e)&&(this.Start(),this.stopEvent(t)))},d.prototype.Move=function(t){this.walker.move(t),this.Update()},d.prototype.initWalker=function(){this.speechGenerator=sre.SpeechGeneratorFactory.generator("Tree");var t=sre.WalkerFactory.walker("dummy",this.node,this.speechGenerator,this.highlighter,this.mml);this.walker=t},d.prototype.getOptions=function(){var t=this.speechGenerator.getOptions(),e=n(this.document.options.a11y.speechRules.split("-"),2),o=e[0],r=e[1];return"speech"!==t.modality||t.domain===o&&t.style===r||(t.domain=o,t.style=r,this.walker.update(t)),t},d);function d(t,e,o,r){var i=p.call(this,t,e,o)||this;return i.document=t,i.region=e,i.node=o,i.mml=r,i.showRegion="subtitles",i.init=!1,i.restarted=!1,i.initWalker(),i}e.SpeechExplorer=u;var f,y=(i(v,f=h),v.prototype.Update=function(t){void 0===t&&(t=!1),f.prototype.Update.call(this,t),this.showFocus()},v.prototype.Start=function(){f.prototype.Start.call(this),this.region.Show(this.node,this.highlighter),this.walker.activate(),this.Update()},v.prototype.showFocus=function(){var t=this.walker.getFocus().getNodes()[0];this.region.Show(t,this.highlighter)},v.prototype.Move=function(t){this.walker.move(t)&&this.Update()},v.prototype.KeyDown=function(t){var e=t.keyCode;return 27===e?(this.Stop(),void this.stopEvent(t)):this.active&&13!==e?(this.Move(e),void this.stopEvent(t)):void((32===e&&t.shiftKey||13===e)&&(this.Start(),this.stopEvent(t)))},v);function v(t,e,o,r){var i=f.call(this,t,e,o)||this;return i.document=t,i.region=e,i.node=o,i.mml=r,i.walker=sre.WalkerFactory.walker("table",i.node,sre.SpeechGeneratorFactory.generator("Dummy"),i.highlighter,i.mml),i}e.Magnifier=y},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),n=this&&this.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=n.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return a};Object.defineProperty(e,"__esModule",{value:!0});var a,s=o(2),l=o(0),h=(a=l.AbstractExplorer,i(c,a),c.prototype.MouseOver=function(t){this.Start()},c.prototype.MouseOut=function(t){this.Stop()},c);function c(){var t=null!==a&&a.apply(this,arguments)||this;return t.events=a.prototype.Events.call(t).concat([["mouseover",t.MouseOver.bind(t)],["mouseout",t.MouseOut.bind(t)]]),t}e.AbstractMouseExplorer=h;var p,u=(i(d,p=h),d.prototype.MouseOut=function(t){t.clientX===this.coord[0]&&t.clientY===this.coord[1]||(this.highlighter.unhighlight(),this.region.Hide(),p.prototype.MouseOut.call(this,t))},d.prototype.MouseOver=function(t){p.prototype.MouseOver.call(this,t);var e=t.target;this.coord=[t.clientX,t.clientY];var o=n(this.getNode(e),2),r=o[0],i=o[1];r&&(this.highlighter.unhighlight(),this.highlighter.highlight([r]),this.region.Update(i),this.region.Show(r,this.highlighter))},d.prototype.getNode=function(t){for(var e=t;t&&t!==this.node;){if(this.nodeQuery(t))return[t,this.nodeAccess(t)];t=t.parentNode}for(t=e;t;){if(this.nodeQuery(t))return[t,this.nodeAccess(t)];var o=t.childNodes[0];t=o&&"defs"===o.tagName?t.childNodes[1]:o}return[null,null]},d);function d(t,e,o,r,i){var n=p.call(this,t,e,o)||this;return n.document=t,n.region=e,n.node=o,n.nodeQuery=r,n.nodeAccess=i,n}e.Hoverer=u;var f,y=(i(v,f=u),v);function v(){return null!==f&&f.apply(this,arguments)||this}e.ValueHoverer=y;var g,m=(i(b,g=u),b);function b(){return null!==g&&g.apply(this,arguments)||this}e.ContentHoverer=m;var x,_=(i(S,x=u),S);function S(t,e,o){var r=x.call(this,t,new s.DummyRegion(t),o,function(t){return r.highlighter.isMactionNode(t)},function(t){})||this;return r.document=t,r.node=o,r}e.FlameHoverer=_},function(t,e,o){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var n,a=o(0),s=(n=a.AbstractExplorer,i(l,n),l.prototype.Attach=function(){n.prototype.Attach.call(this),this.Start()},l.prototype.Detach=function(){this.Stop(),n.prototype.Detach.call(this)},l);function l(t,e,o,r){var i=n.call(this,t,null,o)||this;return i.document=t,i.region=e,i.node=o,i.mml=r,i.stoppable=!1,i}e.AbstractTreeExplorer=s;var h,c=(i(p,h=s),p.prototype.Start=function(){this.active||(this.active=!0,this.highlighter.highlightAll(this.node))},p.prototype.Stop=function(){this.active&&this.highlighter.unhighlightAll(this.node),this.active=!1},p);function p(){return null!==h&&h.apply(this,arguments)||this}e.FlameColorer=c;var u,d=(i(f,u=s),f.prototype.Start=function(){if(!this.active){this.active=!0;var t=sre.SpeechGeneratorFactory.generator("Color");this.node.hasAttribute("hasforegroundcolor")||(t.generateSpeech(this.node,this.mml),this.node.setAttribute("hasforegroundcolor","true")),this.highlighter.colorizeAll(this.node)}},f.prototype.Stop=function(){this.active&&this.highlighter.uncolorizeAll(this.node),this.active=!1},f);function f(){return null!==u&&u.apply(this,arguments)||this}e.TreeColorer=d},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.protoItem=MathJax._.core.MathItem.protoItem,e.AbstractMathItem=MathJax._.core.MathItem.AbstractMathItem,e.STATE=MathJax._.core.MathItem.STATE,e.newState=MathJax._.core.MathItem.newState},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnrichedMathItemMixin=MathJax._.a11y["semantic-enrich"].EnrichedMathItemMixin,e.EnrichedMathDocumentMixin=MathJax._.a11y["semantic-enrich"].EnrichedMathDocumentMixin,e.EnrichHandler=MathJax._.a11y["semantic-enrich"].EnrichHandler},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.APPEND=MathJax._.util.Options.APPEND,e.REMOVE=MathJax._.util.Options.REMOVE,e.Expandable=MathJax._.util.Options.Expandable,e.expandable=MathJax._.util.Options.expandable,e.makeArray=MathJax._.util.Options.makeArray,e.keys=MathJax._.util.Options.keys,e.copy=MathJax._.util.Options.copy,e.insert=MathJax._.util.Options.insert,e.defaultOptions=MathJax._.util.Options.defaultOptions,e.userOptions=MathJax._.util.Options.userOptions,e.selectOptions=MathJax._.util.Options.selectOptions,e.selectOptionsFromKeys=MathJax._.util.Options.selectOptionsFromKeys,e.separateOptions=MathJax._.util.Options.separateOptions},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DATAMJX=MathJax._.core.MmlTree.SerializedMmlVisitor.DATAMJX,e.SerializedMmlVisitor=MathJax._.core.MmlTree.SerializedMmlVisitor.SerializedMmlVisitor},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MJContextMenu=MathJax._.ui.menu.MJContextMenu.MJContextMenu},function(t,e,o){"use strict";var h=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0});var r=(Object.defineProperty(i.prototype,"cssText",{get:function(){return this.getStyleString()},enumerable:!0,configurable:!0}),i.prototype.addStyles=function(t){var e,o;if(t)try{for(var r=h(Object.keys(t)),i=r.next();!i.done;i=r.next()){var n=i.value;this.styles[n]||(this.styles[n]={}),Object.assign(this.styles[n],t[n])}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}},i.prototype.removeStyles=function(){for(var e,t,o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];try{for(var i=h(o),n=i.next();!n.done;n=i.next()){var a=n.value;delete this.styles[a]}}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},i.prototype.clear=function(){this.styles={}},i.prototype.getStyleString=function(){var e,t,o=Object.keys(this.styles),r=new Array(o.length),i=0;try{for(var n=h(o),a=n.next();!a.done;a=n.next()){var s=a.value;r[i++]=s+" {\n"+this.getStyleDefString(this.styles[s])+"\n}"}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r.join("\n\n")},i.prototype.getStyleDefString=function(t){var e,o,r=Object.keys(t),i=new Array(r.length),n=0;try{for(var a=h(r),s=a.next();!s.done;s=a.next()){var l=s.value;i[n++]="  "+l+": "+t[l]+";"}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(e)throw e.error}}return i.join("\n")},i);function i(t){void 0===t&&(t=null),this.styles={},this.addStyles(t)}e.CssStyles=r},function(t,e,o){"use strict";o.r(e);var r=o(4),i=o(3),n=o(0),a=o(5),s=o(6),l=o(2),h=o(7),c=o(1);Object(r.combineWithMathJax)({_:{a11y:{explorer_ts:i,explorer:{Explorer:n,KeyExplorer:a,MouseExplorer:s,Region:l,TreeExplorer:h},sre:c}}}),MathJax.startup&&MathJax.startup.extendHandler(function(t){return Object(i.ExplorerHandler)(t)})}]);