var i,m=this;function aa(a,b){a=a.split(".");b=b||m;for(var c;c=a.shift();)if(b[c])b=b[c];else return null;return b}function p(){}
function q(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array||!(a instanceof Object)&&Object.prototype.toString.call(a)=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(!(a instanceof Object)&&(Object.prototype.toString.call(a)=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call")))return"function"}else return"null";
else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function ba(a){var b=q(a);return b=="array"||b=="object"&&typeof a.length=="number"}function r(a){return typeof a=="string"}function s(a){return q(a)=="function"}function ca(a){a=q(a);return a=="object"||a=="array"||a=="function"}function t(a){if(a.hasOwnProperty&&a.hasOwnProperty(u))return a[u];a[u]||(a[u]=++da);return a[u]}var u="closure_hashCode_"+Math.floor(Math.random()*2147483648).toString(36),da=0;
function ea(a){var b=q(a);if(b=="object"||b=="array"){if(a.H)return a.H.call(a);b=b=="array"?[]:{};for(var c in a)b[c]=ea(a[c]);return b}return a}function v(a,b){function c(){}c.prototype=b.prototype;a.G=b.prototype;a.prototype=new c};var w=Array.prototype,fa=w.indexOf?function(a,b,c){return w.indexOf.call(a,b,c)}:function(a,b,c){c=c==null?0:c<0?Math.max(0,a.length+c):c;if(r(a)){if(!r(b)||b.length!=1)return-1;return a.indexOf(b,c)}for(c=c;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},x=w.forEach?function(a,b,c){w.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=r(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},ga=w.filter?function(a,b,c){return w.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,
f=[],e=0,g=r(a)?a.split(""):a,h=0;h<d;h++)if(h in g){var j=g[h];if(b.call(c,j,h,a))f[e++]=j}return f};function y(a,b){return fa(a,b)>=0}function ha(a,b){b=fa(a,b);var c;if(c=b>=0)w.splice.call(a,b,1);return c}function ia(a){if(q(a)=="array")return a.concat();else{for(var b=[],c=0,d=a.length;c<d;c++)b[c]=a[c];return b}};function ja(a,b,c){for(var d in a)b.call(c,a[d],d,a)};function ka(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")}function la(a,b){if(b)return a.replace(ma,"&amp;").replace(na,"&lt;").replace(oa,"&gt;").replace(pa,"&quot;");else{if(!qa.test(a))return a;if(a.indexOf("&")!=-1)a=a.replace(ma,"&amp;");if(a.indexOf("<")!=-1)a=a.replace(na,"&lt;");if(a.indexOf(">")!=-1)a=a.replace(oa,"&gt;");if(a.indexOf('"')!=-1)a=a.replace(pa,"&quot;");return a}}var ma=/&/g,na=/</g,oa=/>/g,pa=/\"/g,qa=/[&<>\"]/;function z(a,b){return a.indexOf(b)!=-1}
function ra(a,b){var c=0;a=ka(String(a)).split(".");b=ka(String(b)).split(".");for(var d=Math.max(a.length,b.length),f=0;c==0&&f<d;f++){var e=a[f]||"",g=b[f]||"",h=new RegExp("(\\d*)(\\D*)","g"),j=new RegExp("(\\d*)(\\D*)","g");do{var k=h.exec(e)||["","",""],n=j.exec(g)||["","",""];if(k[0].length==0&&n[0].length==0)break;c=k[1].length==0?0:parseInt(k[1],10);var l=n[1].length==0?0:parseInt(n[1],10);c=A(c,l)||A(k[2].length==0,n[2].length==0)||A(k[2],n[2])}while(c==0)}return c}
function A(a,b){if(a<b)return-1;else if(a>b)return 1;return 0}(Date.now||function(){return+new Date})();var B,C,D,sa,E;function ta(){return m.navigator?m.navigator.userAgent:null}function F(){return m.navigator}(function(){E=sa=D=C=B=false;var a;if(a=ta()){var b=F();B=a.indexOf("Opera")==0;C=!B&&a.indexOf("MSIE")!=-1;sa=(D=!B&&a.indexOf("WebKit")!=-1)&&a.indexOf("Mobile")!=-1;E=!B&&!D&&b.product=="Gecko"}})();var ua=B,G=C,va=E,H=D,I=function(){var a=F();return a&&a.platform||""}();(function(){z(I,"Mac");z(I,"Win");z(I,"Linux");F()&&z(F().appVersion||"","X11")})();
var wa=function(){var a="",b;if(ua&&m.opera){a=m.opera.version;a=typeof a=="function"?a():a}else{if(va)b=/rv\:([^\);]+)(\)|;)/;else if(G)b=/MSIE\s+([^\);]+)(\)|;)/;else if(H)b=/WebKit\/(\S+)/;if(b)a=(a=b.exec(ta()))?a[1]:""}return a}(),xa={};function J(a){return xa[a]||(xa[a]=ra(wa,a)>=0)};function ya(a,b){ja(b,function(c,d){if(d=="style")a.style.cssText=c;else if(d=="class")a.className=c;else if(d=="for")a.htmlFor=c;else if(d in za)a.setAttribute(za[d],c);else a[d]=c})}var za={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder",type:"type"};
function Aa(a,b){var c=b[0],d=b[1];if(G&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',la(d.name),'"');if(d.type){c.push(' type="',la(d.type),'"');d=ea(d);delete d.type}c.push(">");c=c.join("")}var f=a.createElement(c);if(d)if(r(d))f.className=d;else ya(f,d);if(b.length>2){d=function(g){if(g)f.appendChild(r(g)?a.createTextNode(g):g)};for(c=2;c<b.length;c++){var e=b[c];ba(e)&&!(ca(e)&&e.nodeType>0)?x(Ba(e)?ia(e):e,d):d(e)}}return f}H&&J("522");
function Ba(a){if(a&&typeof a.length=="number")if(ca(a))return typeof a.item=="function"||typeof a.item=="string";else if(s(a))return typeof a.item=="function";return false}function Ca(a){this.l=a||m.document||document}i=Ca.prototype;i.n=function(a){return r(a)?this.l.getElementById(a):a};
i.w=function(a,b,c){var d=this.l;c=c||d;a=a&&a!="*"?a.toLowerCase():"";if(c.querySelectorAll&&(a||b)&&(!H||d.compatMode=="CSS1Compat"||J("528")))b=c.querySelectorAll(a+(b?"."+b:""));else if(b&&c.getElementsByClassName){d=c.getElementsByClassName(b);if(a){c={};for(var f=0,e=0,g;g=d[e];e++)if(a==g.nodeName.toLowerCase())c[f++]=g;c.length=f;b=c}else b=d}else{d=c.getElementsByTagName(a||"*");if(b){c={};for(e=f=0;g=d[e];e++){a=g.className;if(typeof a.split=="function"&&y(a.split(" "),b))c[f++]=g}c.length=
f;b=c}else b=d}return b};i.I=function(){return Aa(this.l,arguments)};i.createElement=function(a){return this.l.createElement(a)};i.createTextNode=function(a){return this.l.createTextNode(a)};i.appendChild=function(a,b){a.appendChild(b)};function K(){}K.prototype.u=false;K.prototype.m=function(){if(!this.u){this.u=true;this.f()}};K.prototype.f=function(){};function L(a,b){this.type=a;this.currentTarget=this.target=b}v(L,K);L.prototype.f=function(){delete this.type;delete this.target;delete this.currentTarget};L.prototype.r=false;L.prototype.M=true;function M(a,b){a&&this.h(a,b)}v(M,L);i=M.prototype;i.target=null;i.relatedTarget=null;i.offsetX=0;i.offsetY=0;i.clientX=0;i.clientY=0;i.screenX=0;i.screenY=0;i.button=0;i.keyCode=0;i.charCode=0;i.ctrlKey=false;i.altKey=false;i.shiftKey=false;i.metaKey=false;i.v=null;
i.h=function(a,b){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(va)try{b=b.nodeName&&b}catch(d){}}else if(c=="mouseover")b=a.fromElement;else if(c=="mouseout")b=a.toElement;this.relatedTarget=b;this.offsetX=a.offsetX!==undefined?a.offsetX:a.layerX;this.offsetY=a.offsetY!==undefined?a.offsetY:a.layerY;this.clientX=a.clientX!==undefined?a.clientX:a.pageX;this.clientY=a.clientY!==undefined?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=
a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(c=="keypress"?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.v=a;delete this.M;delete this.r};G&&J("8");M.prototype.f=function(){M.G.f.call(this);this.relatedTarget=this.currentTarget=this.target=this.v=null};function Da(){}var Ea=0;i=Da.prototype;i.i=0;i.k=false;i.s=false;i.h=function(a,b,c,d,f,e){if(s(a))this.A=true;else if(a&&a.handleEvent&&s(a.handleEvent))this.A=false;else throw Error("Invalid listener argument");this.o=a;this.D=b;this.src=c;this.type=d;this.capture=!!f;this.z=e;this.s=false;this.i=++Ea;this.k=false};i.handleEvent=function(a){if(this.A)return this.o.call(this.z||this.src,a);return this.o.handleEvent.call(this.o,a)};function N(a,b){this.B=b;this.d=[];if(a>this.B)throw Error("[goog.structs.SimplePool] Initial cannot be greater than max");for(b=0;b<a;b++)this.d.push(this.a?this.a():{})}v(N,K);N.prototype.a=null;N.prototype.t=null;function O(a){if(a.d.length)return a.d.pop();return a.a?a.a():{}}function P(a,b){a.d.length<a.B?a.d.push(b):Fa(a,b)}function Fa(a,b){if(a.t)a.t(b);else if(s(b.m))b.m();else for(var c in b)delete b[c]}
N.prototype.f=function(){N.G.f.call(this);for(var a=this.d;a.length;)Fa(this,a.pop());delete this.d};var Ga,Ha;(function(){Ha=(Ga="ScriptEngine"in m&&m.ScriptEngine()=="JScript")?m.ScriptEngineMajorVersion()+"."+m.ScriptEngineMinorVersion()+"."+m.ScriptEngineBuildVersion():"0"})();var Ia=Ga,Ja=Ha;var Q,R,S,T,U,Ka,La,Ma,Na,Oa,Pa;
(function(){function a(){return{b:0,j:0}}function b(){return[]}function c(){function o(Wa){return g.call(o.src,o.i,Wa)}return o}function d(){return new Da}function f(){return new M}var e=Ia&&!(ra(Ja,"5.7")>=0),g;Ka=function(o){g=o};if(e){Q=function(){return O(h)};R=function(o){P(h,o)};S=function(){return O(j)};T=function(o){P(j,o)};U=function(){return O(k)};La=function(){P(k,c())};Ma=function(){return O(n)};Na=function(o){P(n,o)};Oa=function(){return O(l)};Pa=function(o){P(l,o)};var h=new N(0,600);
h.a=a;var j=new N(0,600);j.a=b;var k=new N(0,600);k.a=c;var n=new N(0,600);n.a=d;var l=new N(0,600);l.a=f}else{Q=a;R=p;S=b;T=p;U=c;La=p;Ma=d;Na=p;Oa=f;Pa=p}})();var V={},W={},X={},Qa={};
function Y(a,b,c,d,f){if(b)if(q(b)=="array"){for(var e=0;e<b.length;e++)Y(a,b[e],c,d,f);return null}else{d=!!d;var g=W;b in g||(g[b]=Q());g=g[b];if(!(d in g)){g[d]=Q();g.b++}g=g[d];var h=t(a),j;g.j++;if(g[h]){j=g[h];for(e=0;e<j.length;e++){g=j[e];if(g.o==c&&g.z==f){if(g.k)break;return j[e].i}}}else{j=g[h]=S();g.b++}e=U();e.src=a;g=Ma();g.h(c,e,a,b,d,f);c=g.i;e.i=c;j.push(g);V[c]=g;X[h]||(X[h]=S());X[h].push(g);if(a.addEventListener){if(a==m||!a.J)a.addEventListener(b,e,d)}else a.attachEvent(Ra(b),e);
return c}else throw Error("Invalid event type");}function Sa(a){if(!V[a])return false;var b=V[a];if(b.k)return false;var c=b.src,d=b.type,f=b.D,e=b.capture;if(c.removeEventListener){if(c==m||!c.J)c.removeEventListener(d,f,e)}else c.detachEvent&&c.detachEvent(Ra(d),f);c=t(c);f=W[d][e][c];if(X[c]){var g=X[c];ha(g,b);g.length==0&&delete X[c]}b.k=true;f.C=true;Ta(d,e,c,f);delete V[a];return true}
function Ta(a,b,c,d){if(!d.p)if(d.C){for(var f=0,e=0;f<d.length;f++)if(d[f].k){var g=d[f].D;g.src=null;La(g);Na(d[f])}else{if(f!=e)d[e]=d[f];e++}d.length=e;d.C=false;if(e==0){T(d);delete W[a][b][c];W[a][b].b--;if(W[a][b].b==0){R(W[a][b]);delete W[a][b];W[a].b--}if(W[a].b==0){R(W[a]);delete W[a]}}}}function Ra(a){if(a in Qa)return Qa[a];return Qa[a]="on"+a}
function Ua(a,b,c,d,f){var e=1;b=t(b);if(a[b]){a.j--;a=a[b];if(a.p)a.p++;else a.p=1;try{for(var g=a.length,h=0;h<g;h++){var j=a[h];if(j&&!j.k)e&=Va(j,f)!==false}}finally{a.p--;Ta(c,d,b,a)}}return Boolean(e)}function Va(a,b){b=a.handleEvent(b);a.s&&Sa(a.i);return b}
Ka(function(a,b){if(!V[a])return true;a=V[a];var c=a.type,d=W;if(!(c in d))return true;d=d[c];var f,e;if(G){f=b||aa("window.event");b=true in d;var g=false in d;if(b){if(f.keyCode<0||f.returnValue!=undefined)return true;a:{var h=false;if(f.keyCode==0)try{f.keyCode=-1;break a}catch(j){h=true}if(h||f.returnValue==undefined)f.returnValue=true}}h=Oa();h.h(f,this);f=true;try{if(b){for(var k=S(),n=h.currentTarget;n;n=n.parentNode)k.push(n);e=d[true];e.j=e.b;for(var l=k.length-1;!h.r&&l>=0&&e.j;l--){h.currentTarget=
k[l];f&=Ua(e,k[l],c,true,h)}if(g){e=d[false];e.j=e.b;for(l=0;!h.r&&l<k.length&&e.j;l++){h.currentTarget=k[l];f&=Ua(e,k[l],c,false,h)}}}else f=Va(a,h)}finally{if(k){k.length=0;T(k)}h.m();Pa(h)}return f}e=new M(b,this);try{f=Va(a,e)}finally{e.m()}return f});var Xa=/\s*;\s*/;function Ya(a,b){a=a+"=";for(var c=String(document.cookie).split(Xa),d=0,f;f=c[d];d++)if(f.indexOf(a)==0)return f.substr(a.length);return b};function Za(a){return ga(a.className.split(/\s+/),function(b){return!!b})}function $a(a,b){var c=Za(a);if(!y(c,b)){c.push(b);a.className=c.join(" ")}}function ab(a,b){var c=Za(a);if(y(c,b)){ha(c,b);a.className=c.join(" ")}};function Z(){}Z.prototype.h=function(){this.g=null;this.c=new Ca(document);this.select=this.c.n("id-lang");this.e=this.c.n("id-code");this.N=this.c.n("wrapper");this.K=this.c.n("frm");this.select.value=Ya("last-lang","python");this.q();Y(this.select,"change",this.q,false,this);x(this.c.w("span","hotsyntax"),this.L,this);Y(this.K,"submit",this.F,false,this)};function bb(a){x(a.c.w("span","hotsyntax"),function(b){var c="s-"+this.select.value,d=Za(b);y(d,c)?$a(b,"active"):ab(b,"active")},a)}
Z.prototype.L=function(a){var b=/s-([\+\w]+)/.exec(a.className)[1];Y(a,"click",function(){this.select.value=b;this.q()},false,this)};
Z.prototype.q=function(){var a=this.select.value,b=2592E3;if(/[;=]/.test("last-lang"))throw Error('Invalid cookie name "last-lang"');if(/;/.test(a))throw Error('Invalid cookie value "'+a+'"');b!==undefined||(b=-1);b=b<0?"":b==0?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date((new Date).getTime()+b*1E3)).toUTCString();document.cookie="last-lang="+a+";path=/"+b;bb(this);this.F();if(a=="python")$(this,"py",4);else if(a=="html")$(this,"html",2);else if(a=="js")$(this,"js",2);else if(a==
"xml")$(this,"xml",2);else a=="css"&&$(this,"css",2)};function $(a,b,c){a.g=new MirrorFrame(CodeMirror.replace(a.e),{height:"406px",content:a.e.value,parserfile:["_"+b+".js"],basefiles:["all.js"],stylesheet:"/static/cm/cm.css",path:"/static/cm/",autoMatchParens:true,indentUnit:c,lineNumbers:true});a.e=null}
Z.prototype.F=function(){if(this.g){this.e=this.c.I("textarea",{name:"code",id:"id-code"});this.e.value=this.g.mirror.getCode();this.g.home.parentNode.removeChild(this.g.home);this.g=null;this.c.appendChild(this.N,this.e);this.e.focus()}};Y(window,"load",function(){var a=new Z;a.h();window.index=a});
