MathJax.Extension["TeX/begingroup"]={version:"2.7.1"},MathJax.Hub.Register.StartupHook("TeX Jax Ready",function(){var t=MathJax.InputJax.TeX,n=t.Definitions,e=MathJax.Object.Subclass({macros:null,environments:null,Init:function(t,n){this.macros=t||{},this.environments=n||{}},Find:function(t,n){if(this[n][t])return this[n][t]},Def:function(t,n,e){this[e][t]=n},Undef:function(t,n){delete this[n][t]},Merge:function(t){MathJax.Hub.Insert(this.macros,t.macros),MathJax.Hub.Insert(this.environments,t.environments)},MergeGlobals:function(t){var n=this.macros;for(var e in n)n.hasOwnProperty(e)&&n[e].global&&(t.Def(e,n[e],"macros",!0),delete n[e].global,delete n[e])},Clear:function(t){if(this.environments={},t)this.macros={};else{var n=this.macros;for(var e in n)n.hasOwnProperty(e)&&!n[e].global&&delete n[e]}return this}}),s=t.nsStack=MathJax.Object.Subclass({stack:null,top:0,isEqn:!1,Init:function(t){this.isEqn=t,this.stack=[],t?this.Push(e()):this.Push(e(n.macros,n.environment))},Def:function(t,n,e,s){var o=this.top-1;if(s){for(;o>0;)this.stack[o].Undef(t,e),o--;MathJax.Object.isArray(n)||(n=[n]),this.isEqn&&(n.global=!0)}this.stack[o].Def(t,n,e)},Push:function(t){this.stack.push(t),this.top=this.stack.length},Pop:function(){var t;return this.top>1?(t=this.stack[--this.top],this.isEqn&&this.stack.pop()):this.isEqn&&this.Clear(),t},Find:function(t,n){for(var e=this.top-1;e>=0;e--){var s=this.stack[e].Find(t,n);if(s)return s}return null},Merge:function(t){t.stack[0].MergeGlobals(this),this.stack[this.top-1].Merge(t.stack[0]);var n=[this.top,this.stack.length-this.top].concat(t.stack.slice(1));this.stack.splice.apply(this.stack,n),this.top=this.stack.length},Reset:function(){this.top=this.stack.length},Clear:function(t){this.stack=[this.stack[0].Clear()],this.top=this.stack.length}},{nsFrame:e});n.Add({macros:{begingroup:"BeginGroup",endgroup:"EndGroup",global:["Extension","newcommand"],gdef:["Extension","newcommand"]}},null,!0),t.Parse.Augment({BeginGroup:function(n){t.eqnStack.Push(e())},EndGroup:function(n){t.eqnStack.top>1?t.eqnStack.Pop():1===t.rootStack.top?t.Error(["ExtraEndMissingBegin","Extra %1 or missing \\begingroup",n]):(t.eqnStack.Clear(),t.rootStack.Pop())},csFindMacro:function(n){return t.eqnStack.Find(n,"macros")||t.rootStack.Find(n,"macros")},envFindName:function(n){return t.eqnStack.Find(n,"environments")||t.rootStack.Find(n,"environments")}}),t.rootStack=s(),t.eqnStack=s(!0),t.prefilterHooks.Add(function(){t.rootStack.Reset(),t.eqnStack.Clear(!0)}),t.postfilterHooks.Add(function(){t.rootStack.Merge(t.eqnStack)}),MathJax.Hub.Register.StartupHook("TeX newcommand Ready",function(){n.Add({macros:{global:"Global",gdef:["Macro","\\global\\def"]}},null,!0),t.Parse.Augment({setDef:function(n,e){e.isUser=!0,t.eqnStack.Def(n,e,"macros",this.stack.env.isGlobal),delete this.stack.env.isGlobal},setEnv:function(n,e){e.isUser=!0,t.eqnStack.Def(n,e,"environments")},Global:function(n){var e=this.i,s=this.GetCSname(n);this.i=e,"let"!==s&&"def"!==s&&"newcommand"!==s&&t.Error(["GlobalNotFollowedBy","%1 not followed by \\let, \\def, or \\newcommand",n]),this.stack.env.isGlobal=!0}})}),MathJax.Hub.Startup.signal.Post("TeX begingroup Ready")}),MathJax.Ajax.loadComplete("[MathJax]/extensions/TeX/begingroup.js");